Skip to content

Commit 1e3e033

Browse files
committed
docs: fix typo
1 parent adbc75b commit 1e3e033

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

crates/toml_edit/src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl Array {
132132
self.values.len()
133133
}
134134

135-
/// Return true iff `self.len() == 0`.
135+
/// Return true if `self.len() == 0`.
136136
///
137137
/// # Examples
138138
///

crates/toml_edit/src/array_of_tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl ArrayOfTables {
6464
self.values.len()
6565
}
6666

67-
/// Returns true iff `self.len() == 0`.
67+
/// Returns true if `self.len() == 0`.
6868
pub fn is_empty(&self) -> bool {
6969
self.len() == 0
7070
}

crates/toml_edit/src/inline_table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl InlineTable {
263263
self.iter().count()
264264
}
265265

266-
/// Returns true iff the table is empty.
266+
/// Returns true if the table is empty.
267267
pub fn is_empty(&self) -> bool {
268268
self.len() == 0
269269
}
@@ -354,7 +354,7 @@ impl InlineTable {
354354
})
355355
}
356356

357-
/// Returns true iff the table contains given key.
357+
/// Returns true if the table contains given key.
358358
pub fn contains_key(&self, key: &str) -> bool {
359359
if let Some(kv) = self.items.get(key) {
360360
kv.value.is_value()

crates/toml_edit/src/item.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub enum Item {
2121
}
2222

2323
impl Item {
24-
/// Sets `self` to the given item iff `self` is none and
24+
/// Sets `self` to the given item if `self` is none and
2525
/// returns a mutable reference to `self`.
2626
pub fn or_insert(&mut self, item: Item) -> &mut Item {
2727
if self.is_none() {
@@ -177,19 +177,19 @@ impl Item {
177177
};
178178
*self = other;
179179
}
180-
/// Returns true iff `self` is a value.
180+
/// Returns true if `self` is a value.
181181
pub fn is_value(&self) -> bool {
182182
self.as_value().is_some()
183183
}
184-
/// Returns true iff `self` is a table.
184+
/// Returns true if `self` is a table.
185185
pub fn is_table(&self) -> bool {
186186
self.as_table().is_some()
187187
}
188-
/// Returns true iff `self` is an array of tables.
188+
/// Returns true if `self` is an array of tables.
189189
pub fn is_array_of_tables(&self) -> bool {
190190
self.as_array_of_tables().is_some()
191191
}
192-
/// Returns true iff `self` is `None`.
192+
/// Returns true if `self` is `None`.
193193
pub fn is_none(&self) -> bool {
194194
matches!(*self, Item::None)
195195
}
@@ -201,7 +201,7 @@ impl Item {
201201
self.as_value().and_then(Value::as_integer)
202202
}
203203

204-
/// Returns true iff `self` is an integer.
204+
/// Returns true if `self` is an integer.
205205
pub fn is_integer(&self) -> bool {
206206
self.as_integer().is_some()
207207
}
@@ -211,7 +211,7 @@ impl Item {
211211
self.as_value().and_then(Value::as_float)
212212
}
213213

214-
/// Returns true iff `self` is a float.
214+
/// Returns true if `self` is a float.
215215
pub fn is_float(&self) -> bool {
216216
self.as_float().is_some()
217217
}
@@ -221,7 +221,7 @@ impl Item {
221221
self.as_value().and_then(Value::as_bool)
222222
}
223223

224-
/// Returns true iff `self` is a boolean.
224+
/// Returns true if `self` is a boolean.
225225
pub fn is_bool(&self) -> bool {
226226
self.as_bool().is_some()
227227
}
@@ -231,7 +231,7 @@ impl Item {
231231
self.as_value().and_then(Value::as_str)
232232
}
233233

234-
/// Returns true iff `self` is a string.
234+
/// Returns true if `self` is a string.
235235
pub fn is_str(&self) -> bool {
236236
self.as_str().is_some()
237237
}
@@ -241,7 +241,7 @@ impl Item {
241241
self.as_value().and_then(Value::as_datetime)
242242
}
243243

244-
/// Returns true iff `self` is a date-time.
244+
/// Returns true if `self` is a date-time.
245245
pub fn is_datetime(&self) -> bool {
246246
self.as_datetime().is_some()
247247
}
@@ -256,7 +256,7 @@ impl Item {
256256
self.as_value_mut().and_then(Value::as_array_mut)
257257
}
258258

259-
/// Returns true iff `self` is an array.
259+
/// Returns true if `self` is an array.
260260
pub fn is_array(&self) -> bool {
261261
self.as_array().is_some()
262262
}
@@ -271,7 +271,7 @@ impl Item {
271271
self.as_value_mut().and_then(Value::as_inline_table_mut)
272272
}
273273

274-
/// Returns true iff `self` is an inline table.
274+
/// Returns true if `self` is an inline table.
275275
pub fn is_inline_table(&self) -> bool {
276276
self.as_inline_table().is_some()
277277
}
@@ -292,7 +292,7 @@ impl Item {
292292
}
293293
}
294294

295-
/// Returns true iff `self` is either a table, or an inline table.
295+
/// Returns true if `self` is either a table, or an inline table.
296296
pub fn is_table_like(&self) -> bool {
297297
self.as_table_like().is_some()
298298
}

crates/toml_edit/src/value.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Value {
4949
}
5050
}
5151

52-
/// Returns true iff `self` is a string.
52+
/// Returns true if `self` is a string.
5353
pub fn is_str(&self) -> bool {
5454
self.as_str().is_some()
5555
}
@@ -62,7 +62,7 @@ impl Value {
6262
}
6363
}
6464

65-
/// Returns true iff `self` is an integer.
65+
/// Returns true if `self` is an integer.
6666
pub fn is_integer(&self) -> bool {
6767
self.as_integer().is_some()
6868
}
@@ -75,7 +75,7 @@ impl Value {
7575
}
7676
}
7777

78-
/// Returns true iff `self` is a float.
78+
/// Returns true if `self` is a float.
7979
pub fn is_float(&self) -> bool {
8080
self.as_float().is_some()
8181
}
@@ -88,7 +88,7 @@ impl Value {
8888
}
8989
}
9090

91-
/// Returns true iff `self` is a boolean.
91+
/// Returns true if `self` is a boolean.
9292
pub fn is_bool(&self) -> bool {
9393
self.as_bool().is_some()
9494
}
@@ -101,7 +101,7 @@ impl Value {
101101
}
102102
}
103103

104-
/// Returns true iff `self` is a date-time.
104+
/// Returns true if `self` is a date-time.
105105
pub fn is_datetime(&self) -> bool {
106106
self.as_datetime().is_some()
107107
}
@@ -122,7 +122,7 @@ impl Value {
122122
}
123123
}
124124

125-
/// Returns true iff `self` is an array.
125+
/// Returns true if `self` is an array.
126126
pub fn is_array(&self) -> bool {
127127
self.as_array().is_some()
128128
}
@@ -143,7 +143,7 @@ impl Value {
143143
}
144144
}
145145

146-
/// Returns true iff `self` is an inline table.
146+
/// Returns true if `self` is an inline table.
147147
pub fn is_inline_table(&self) -> bool {
148148
self.as_inline_table().is_some()
149149
}

0 commit comments

Comments
 (0)