Skip to content

Commit

Permalink
Merge pull request #538 from Cactus-man/main
Browse files Browse the repository at this point in the history
Fixed spelling errors
  • Loading branch information
epage committed Apr 3, 2023
2 parents 70fbc29 + 7c6e834 commit 5afe783
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/toml_edit/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl Table {
self.items.iter().filter(|i| !(i.1).value.is_none()).count()
}

/// Returns true iff the table is empty.
/// Returns true if the table is empty.
pub fn is_empty(&self) -> bool {
self.len() == 0
}
Expand Down Expand Up @@ -340,7 +340,7 @@ impl Table {
})
}

/// Returns true iff the table contains an item with the given key.
/// Returns true if the table contains an item with the given key.
pub fn contains_key(&self, key: &str) -> bool {
if let Some(kv) = self.items.get(key) {
!kv.value.is_none()
Expand All @@ -349,7 +349,7 @@ impl Table {
}
}

/// Returns true iff the table contains a table with the given key.
/// Returns true if the table contains a table with the given key.
pub fn contains_table(&self, key: &str) -> bool {
if let Some(kv) = self.items.get(key) {
kv.value.is_table()
Expand All @@ -358,7 +358,7 @@ impl Table {
}
}

/// Returns true iff the table contains a value with the given key.
/// Returns true if the table contains a value with the given key.
pub fn contains_value(&self, key: &str) -> bool {
if let Some(kv) = self.items.get(key) {
kv.value.is_value()
Expand All @@ -367,7 +367,7 @@ impl Table {
}
}

/// Returns true iff the table contains an array of tables with the given key.
/// Returns true if the table contains an array of tables with the given key.
pub fn contains_array_of_tables(&self, key: &str) -> bool {
if let Some(kv) = self.items.get(key) {
kv.value.is_array_of_tables()
Expand Down Expand Up @@ -502,7 +502,7 @@ pub trait TableLike: crate::private::Sealed {
fn len(&self) -> usize {
self.iter().filter(|&(_, v)| !v.is_none()).count()
}
/// Returns true iff the table is empty.
/// Returns true if the table is empty.
fn is_empty(&self) -> bool {
self.len() == 0
}
Expand All @@ -520,7 +520,7 @@ pub trait TableLike: crate::private::Sealed {
fn get_key_value<'a>(&'a self, key: &str) -> Option<(&'a Key, &'a Item)>;
/// Return mutable references to the key-value pair stored for key, if it is present, else None.
fn get_key_value_mut<'a>(&'a mut self, key: &str) -> Option<(KeyMut<'a>, &'a mut Item)>;
/// Returns true iff the table contains an item with the given key.
/// Returns true if the table contains an item with the given key.
fn contains_key(&self, key: &str) -> bool;
/// Inserts a key-value pair into the map.
fn insert(&mut self, key: &str, value: Item) -> Option<Item>;
Expand Down

0 comments on commit 5afe783

Please sign in to comment.