summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar rustrover <seekseat@126.com>2024-03-09 15:26:37 +0800
committerLibravatar rustrover <seekseat@126.com>2024-03-09 15:26:37 +0800
commit500ba962d17853bdef7aed49b150dbe3f45692e9 (patch)
tree52f7177fb7a31494a0d021c5f1c238145577a7c9
parenta341e39df63e9c4860eb796bf5c4b6a9b41116a2 (diff)
downloadiced-500ba962d17853bdef7aed49b150dbe3f45692e9.tar.gz
iced-500ba962d17853bdef7aed49b150dbe3f45692e9.tar.bz2
iced-500ba962d17853bdef7aed49b150dbe3f45692e9.zip
fix some comments
Signed-off-by: rustrover <seekseat@126.com>
-rw-r--r--core/src/background.rs2
-rw-r--r--core/src/widget/text.rs2
-rw-r--r--examples/integration/README.md2
-rw-r--r--examples/integration/src/main.rs2
-rw-r--r--graphics/src/error.rs4
-rw-r--r--wgpu/src/shader/quad.wgsl2
-rw-r--r--widget/src/image/viewer.rs2
7 files changed, 8 insertions, 8 deletions
diff --git a/core/src/background.rs b/core/src/background.rs
index eb4b5021..c8b7cbea 100644
--- a/core/src/background.rs
+++ b/core/src/background.rs
@@ -12,7 +12,7 @@ pub enum Background {
}
impl Background {
- /// Scales the the alpha channel of the [`Background`] by the given
+ /// Scales the alpha channel of the [`Background`] by the given
/// factor.
pub fn scale_alpha(self, factor: f32) -> Self {
match self {
diff --git a/core/src/widget/text.rs b/core/src/widget/text.rs
index a220127c..0305972b 100644
--- a/core/src/widget/text.rs
+++ b/core/src/widget/text.rs
@@ -330,7 +330,7 @@ where
}
}
-/// The apperance of some text.
+/// The appearance of some text.
#[derive(Debug, Clone, Copy, Default)]
pub struct Appearance {
/// The [`Color`] of the text.
diff --git a/examples/integration/README.md b/examples/integration/README.md
index 996cdc17..aa3a6e94 100644
--- a/examples/integration/README.md
+++ b/examples/integration/README.md
@@ -14,7 +14,7 @@ cargo run --package integration_wgpu
```
### How to run this example with WebGL backend
-NOTE: Currently, WebGL backend is is still experimental, so expect bugs.
+NOTE: Currently, WebGL backend is still experimental, so expect bugs.
```sh
# 0. Install prerequisites
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index f53b5bf1..9cd801b2 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -170,7 +170,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
// Run event loop
event_loop.run(move |event, window_target| {
- // You should change this if you want to render continuosly
+ // You should change this if you want to render continuously
window_target.set_control_flow(ControlFlow::Wait);
match event {
diff --git a/graphics/src/error.rs b/graphics/src/error.rs
index 77758f54..c6ea98a3 100644
--- a/graphics/src/error.rs
+++ b/graphics/src/error.rs
@@ -13,7 +13,7 @@ pub enum Error {
#[error("a suitable graphics adapter or device could not be found")]
GraphicsAdapterNotFound,
- /// An error occured in the context's internal backend
- #[error("an error occured in the context's internal backend")]
+ /// An error occurred in the context's internal backend
+ #[error("an error occurred in the context's internal backend")]
BackendError(String),
}
diff --git a/wgpu/src/shader/quad.wgsl b/wgpu/src/shader/quad.wgsl
index 4de73362..a367d5e6 100644
--- a/wgpu/src/shader/quad.wgsl
+++ b/wgpu/src/shader/quad.wgsl
@@ -22,7 +22,7 @@ fn rounded_box_sdf(to_center: vec2<f32>, size: vec2<f32>, radius: f32) -> f32 {
return length(max(abs(to_center) - size + vec2<f32>(radius, radius), vec2<f32>(0.0, 0.0))) - radius;
}
-// Based on the fragement position and the center of the quad, select one of the 4 radi.
+// Based on the fragment position and the center of the quad, select one of the 4 radi.
// Order matches CSS border radius attribute:
// radi.x = top-left, radi.y = top-right, radi.z = bottom-right, radi.w = bottom-left
fn select_border_radius(radi: vec4<f32>, position: vec2<f32>, center: vec2<f32>) -> f32 {
diff --git a/widget/src/image/viewer.rs b/widget/src/image/viewer.rs
index 9666ff9f..f45c401a 100644
--- a/widget/src/image/viewer.rs
+++ b/widget/src/image/viewer.rs
@@ -126,7 +126,7 @@ where
};
// Only calculate viewport sizes if the images are constrained to a limited space.
- // If they are Fill|Portion let them expand within their alotted space.
+ // If they are Fill|Portion let them expand within their allotted space.
match expansion_size {
Length::Shrink | Length::Fixed(_) => {
let aspect_ratio = width as f32 / height as f32;