mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +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();
|
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))
|
Some((self.start + start, self.end + start))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
@ -23,9 +23,7 @@ where
|
|||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
if self.current.is_none() {
|
if self.current.is_none() {
|
||||||
self.current = self.inner.next();
|
self.current = self.inner.next();
|
||||||
if self.current.is_none() {
|
self.current?;
|
||||||
return None;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
@ -49,6 +49,12 @@ where
|
|||||||
r: &'a C,
|
r: &'a C,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> Default for SpannedString<T> {
|
||||||
|
fn default() -> Self {
|
||||||
|
SpannedString::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, T> SpannedText for &'a SpannedString<T> {
|
impl<'a, T> SpannedText for &'a SpannedString<T> {
|
||||||
type S = IndexedSpan<T>;
|
type S = IndexedSpan<T>;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user