Skip to content

Commit

Permalink
Minor Clippy-suggested cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaj committed Apr 27, 2017
1 parent eac50f1 commit 0ff9dcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ pub enum SassItem {
Each(String, Value, Vec<SassItem>),
For {
name: String,
from: Value,
to: Value,
from: Box<Value>,
to: Box<Value>,
inclusive: bool,
body: Vec<SassItem>,
},
Expand Down Expand Up @@ -326,8 +326,8 @@ named!(for_loop<SassItem>,
body: body_block >>
(SassItem::For {
name: name,
from: from,
to: to,
from: Box::new(from),
to: Box::new(to),
inclusive: inclusive,
body: body
})));
Expand Down
4 changes: 2 additions & 2 deletions src/valueexpression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ named!(simple_dqs_part<Value>,
Quotes::Double)));
named!(nonempty_dqs_part<Value>,
map!(verify!(escaped!(is_not!("\\\"#"), '\\', take!(1)),
|s: &[u8]| s.len() > 0),
|s: &[u8]| !s.is_empty()),
|s| Value::Literal(unescape(from_utf8(s).unwrap()),
Quotes::Double)));

Expand All @@ -655,7 +655,7 @@ named!(simple_sqs_part<Value>,
Quotes::Single)));
named!(nonempty_sqs_part<Value>,
map!(verify!(escaped!(is_not!("\\'#"), '\\', take!(1)),
|s: &[u8]| s.len() > 0),
|s: &[u8]| !s.is_empty()),
|s| Value::Literal(unescape(from_utf8(s).unwrap()),
Quotes::Single)));

Expand Down

0 comments on commit 0ff9dcc

Please sign in to comment.