mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-14 17:08:37 +00:00
Fix clippy::needless_return
warnings
This commit is contained in:
parent
6cf747678c
commit
b009fee5ea
@ -360,10 +360,10 @@ pub struct EscapeSequenceOffsetsIterator<'a> {
|
||||
|
||||
impl<'a> EscapeSequenceOffsetsIterator<'a> {
|
||||
pub fn new(text: &'a str) -> EscapeSequenceOffsetsIterator<'a> {
|
||||
return EscapeSequenceOffsetsIterator {
|
||||
EscapeSequenceOffsetsIterator {
|
||||
text,
|
||||
chars: text.char_indices().peekable(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Takes values from the iterator while the predicate returns true.
|
||||
@ -564,10 +564,10 @@ pub struct EscapeSequenceIterator<'a> {
|
||||
|
||||
impl<'a> EscapeSequenceIterator<'a> {
|
||||
pub fn new(text: &'a str) -> EscapeSequenceIterator<'a> {
|
||||
return EscapeSequenceIterator {
|
||||
EscapeSequenceIterator {
|
||||
text,
|
||||
offset_iter: EscapeSequenceOffsetsIterator::new(text),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user