From 1e3e03305bbc13f5b6468b4a44921fd5ef89f104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Mon, 6 May 2024 17:52:59 -0700 Subject: [PATCH] docs: fix typo --- crates/toml_edit/src/array.rs | 2 +- crates/toml_edit/src/array_of_tables.rs | 2 +- crates/toml_edit/src/inline_table.rs | 4 ++-- crates/toml_edit/src/item.rs | 26 ++++++++++++------------- crates/toml_edit/src/value.rs | 14 ++++++------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/crates/toml_edit/src/array.rs b/crates/toml_edit/src/array.rs index c1acf0bc..3e69d5c7 100644 --- a/crates/toml_edit/src/array.rs +++ b/crates/toml_edit/src/array.rs @@ -132,7 +132,7 @@ impl Array { self.values.len() } - /// Return true iff `self.len() == 0`. + /// Return true if `self.len() == 0`. /// /// # Examples /// diff --git a/crates/toml_edit/src/array_of_tables.rs b/crates/toml_edit/src/array_of_tables.rs index 83a4ae71..b562f899 100644 --- a/crates/toml_edit/src/array_of_tables.rs +++ b/crates/toml_edit/src/array_of_tables.rs @@ -64,7 +64,7 @@ impl ArrayOfTables { self.values.len() } - /// Returns true iff `self.len() == 0`. + /// Returns true if `self.len() == 0`. pub fn is_empty(&self) -> bool { self.len() == 0 } diff --git a/crates/toml_edit/src/inline_table.rs b/crates/toml_edit/src/inline_table.rs index 6e713241..c0a58fe6 100644 --- a/crates/toml_edit/src/inline_table.rs +++ b/crates/toml_edit/src/inline_table.rs @@ -263,7 +263,7 @@ impl InlineTable { self.iter().count() } - /// Returns true iff the table is empty. + /// Returns true if the table is empty. pub fn is_empty(&self) -> bool { self.len() == 0 } @@ -354,7 +354,7 @@ impl InlineTable { }) } - /// Returns true iff the table contains given key. + /// Returns true if the table contains given key. pub fn contains_key(&self, key: &str) -> bool { if let Some(kv) = self.items.get(key) { kv.value.is_value() diff --git a/crates/toml_edit/src/item.rs b/crates/toml_edit/src/item.rs index 6e3aaafa..cb55625b 100644 --- a/crates/toml_edit/src/item.rs +++ b/crates/toml_edit/src/item.rs @@ -21,7 +21,7 @@ pub enum Item { } impl Item { - /// Sets `self` to the given item iff `self` is none and + /// Sets `self` to the given item if `self` is none and /// returns a mutable reference to `self`. pub fn or_insert(&mut self, item: Item) -> &mut Item { if self.is_none() { @@ -177,19 +177,19 @@ impl Item { }; *self = other; } - /// Returns true iff `self` is a value. + /// Returns true if `self` is a value. pub fn is_value(&self) -> bool { self.as_value().is_some() } - /// Returns true iff `self` is a table. + /// Returns true if `self` is a table. pub fn is_table(&self) -> bool { self.as_table().is_some() } - /// Returns true iff `self` is an array of tables. + /// Returns true if `self` is an array of tables. pub fn is_array_of_tables(&self) -> bool { self.as_array_of_tables().is_some() } - /// Returns true iff `self` is `None`. + /// Returns true if `self` is `None`. pub fn is_none(&self) -> bool { matches!(*self, Item::None) } @@ -201,7 +201,7 @@ impl Item { self.as_value().and_then(Value::as_integer) } - /// Returns true iff `self` is an integer. + /// Returns true if `self` is an integer. pub fn is_integer(&self) -> bool { self.as_integer().is_some() } @@ -211,7 +211,7 @@ impl Item { self.as_value().and_then(Value::as_float) } - /// Returns true iff `self` is a float. + /// Returns true if `self` is a float. pub fn is_float(&self) -> bool { self.as_float().is_some() } @@ -221,7 +221,7 @@ impl Item { self.as_value().and_then(Value::as_bool) } - /// Returns true iff `self` is a boolean. + /// Returns true if `self` is a boolean. pub fn is_bool(&self) -> bool { self.as_bool().is_some() } @@ -231,7 +231,7 @@ impl Item { self.as_value().and_then(Value::as_str) } - /// Returns true iff `self` is a string. + /// Returns true if `self` is a string. pub fn is_str(&self) -> bool { self.as_str().is_some() } @@ -241,7 +241,7 @@ impl Item { self.as_value().and_then(Value::as_datetime) } - /// Returns true iff `self` is a date-time. + /// Returns true if `self` is a date-time. pub fn is_datetime(&self) -> bool { self.as_datetime().is_some() } @@ -256,7 +256,7 @@ impl Item { self.as_value_mut().and_then(Value::as_array_mut) } - /// Returns true iff `self` is an array. + /// Returns true if `self` is an array. pub fn is_array(&self) -> bool { self.as_array().is_some() } @@ -271,7 +271,7 @@ impl Item { self.as_value_mut().and_then(Value::as_inline_table_mut) } - /// Returns true iff `self` is an inline table. + /// Returns true if `self` is an inline table. pub fn is_inline_table(&self) -> bool { self.as_inline_table().is_some() } @@ -292,7 +292,7 @@ impl Item { } } - /// Returns true iff `self` is either a table, or an inline table. + /// Returns true if `self` is either a table, or an inline table. pub fn is_table_like(&self) -> bool { self.as_table_like().is_some() } diff --git a/crates/toml_edit/src/value.rs b/crates/toml_edit/src/value.rs index b9232631..02ee5e34 100644 --- a/crates/toml_edit/src/value.rs +++ b/crates/toml_edit/src/value.rs @@ -49,7 +49,7 @@ impl Value { } } - /// Returns true iff `self` is a string. + /// Returns true if `self` is a string. pub fn is_str(&self) -> bool { self.as_str().is_some() } @@ -62,7 +62,7 @@ impl Value { } } - /// Returns true iff `self` is an integer. + /// Returns true if `self` is an integer. pub fn is_integer(&self) -> bool { self.as_integer().is_some() } @@ -75,7 +75,7 @@ impl Value { } } - /// Returns true iff `self` is a float. + /// Returns true if `self` is a float. pub fn is_float(&self) -> bool { self.as_float().is_some() } @@ -88,7 +88,7 @@ impl Value { } } - /// Returns true iff `self` is a boolean. + /// Returns true if `self` is a boolean. pub fn is_bool(&self) -> bool { self.as_bool().is_some() } @@ -101,7 +101,7 @@ impl Value { } } - /// Returns true iff `self` is a date-time. + /// Returns true if `self` is a date-time. pub fn is_datetime(&self) -> bool { self.as_datetime().is_some() } @@ -122,7 +122,7 @@ impl Value { } } - /// Returns true iff `self` is an array. + /// Returns true if `self` is an array. pub fn is_array(&self) -> bool { self.as_array().is_some() } @@ -143,7 +143,7 @@ impl Value { } } - /// Returns true iff `self` is an inline table. + /// Returns true if `self` is an inline table. pub fn is_inline_table(&self) -> bool { self.as_inline_table().is_some() }