mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 11:16:03 +00:00
Fix clippy warnings
This commit is contained in:
parent
d33fb39cd9
commit
6b6398f109
@ -50,7 +50,7 @@ impl Segment {
|
||||
{
|
||||
let span = spans[self.span_id].as_ref();
|
||||
|
||||
if let &IndexedCow::Borrowed { start, .. } = span {
|
||||
if let IndexedCow::Borrowed { start, .. } = *span {
|
||||
Some((self.start + start, self.end + start))
|
||||
} else {
|
||||
None
|
||||
|
@ -23,9 +23,7 @@ where
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
if self.current.is_none() {
|
||||
self.current = self.inner.next();
|
||||
if self.current.is_none() {
|
||||
return None;
|
||||
}
|
||||
self.current?;
|
||||
}
|
||||
|
||||
loop {
|
||||
|
@ -49,6 +49,12 @@ where
|
||||
r: &'a C,
|
||||
}
|
||||
|
||||
impl<T> Default for SpannedString<T> {
|
||||
fn default() -> Self {
|
||||
SpannedString::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> SpannedText for &'a SpannedString<T> {
|
||||
type S = IndexedSpan<T>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user