mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Fix clippy warnings
This commit is contained in:
parent
22a9725f8e
commit
d4f1439abd
@ -537,7 +537,7 @@ impl Cursive {
|
|||||||
// Reference it or something
|
// Reference it or something
|
||||||
|
|
||||||
let sizes = self.screen().layer_sizes();
|
let sizes = self.screen().layer_sizes();
|
||||||
if &self.last_sizes != &sizes {
|
if self.last_sizes != sizes {
|
||||||
self.clear();
|
self.clear();
|
||||||
self.last_sizes = sizes;
|
self.last_sizes = sizes;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,8 @@ pub fn read_char<F>(first: u8, next: F) -> Result<char, String>
|
|||||||
|
|
||||||
// We already have one byte, now read the others.
|
// We already have one byte, now read the others.
|
||||||
for _ in 1..n_bytes {
|
for _ in 1..n_bytes {
|
||||||
let byte = try!(next().ok_or("Missing UTF-8 byte".to_string()));
|
let byte =
|
||||||
|
try!(next().ok_or_else(|| "Missing UTF-8 byte".to_string()));
|
||||||
if byte & 0xC0 != 0x80 {
|
if byte & 0xC0 != 0x80 {
|
||||||
return Err(format!("Found non-continuation byte after leading: \
|
return Err(format!("Found non-continuation byte after leading: \
|
||||||
{}",
|
{}",
|
||||||
|
Loading…
Reference in New Issue
Block a user