Skip to content

Commit 78b22bf

Browse files
committed
Satisfy clippy
1 parent a663dcc commit 78b22bf

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

toml-span/src/de.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ impl<'a> Deserializer<'a> {
840840
/// # Parameters
841841
///
842842
/// * `key_parts`: Each segment of the dotted key, e.g. `part.one` maps to
843-
/// `vec![Cow::Borrowed("part"), Cow::Borrowed("one")].`
843+
/// `vec![Cow::Borrowed("part"), Cow::Borrowed("one")].`
844844
/// * `value`: The parsed value.
845845
/// * `values`: The `Vec` to store the value in.
846846
fn add_dotted_key(

toml-span/src/tokens.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ impl<'a> Tokenizer<'a> {
398398
match ch {
399399
' ' | '\t' => {
400400
me.chars.next();
401-
continue;
402401
}
403402
'\n' => {
404403
me.chars.next();

toml-span/src/value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<'de> Value<'de> {
5252
/// Returns true if the value is a table and is non-empty
5353
#[inline]
5454
pub fn has_keys(&self) -> bool {
55-
self.value.as_ref().map_or(false, |val| {
55+
self.value.as_ref().is_some_and(|val| {
5656
if let ValueInner::Table(table) = val {
5757
!table.is_empty()
5858
} else {
@@ -64,7 +64,7 @@ impl<'de> Value<'de> {
6464
/// Returns true if the value is a table and has the specified key
6565
#[inline]
6666
pub fn has_key(&self, key: &str) -> bool {
67-
self.value.as_ref().map_or(false, |val| {
67+
self.value.as_ref().is_some_and(|val| {
6868
if let ValueInner::Table(table) = val {
6969
table.contains_key(key)
7070
} else {

0 commit comments

Comments
 (0)