mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-15 01:18:31 +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> {
|
impl<'a> EscapeSequenceOffsetsIterator<'a> {
|
||||||
pub fn new(text: &'a str) -> EscapeSequenceOffsetsIterator<'a> {
|
pub fn new(text: &'a str) -> EscapeSequenceOffsetsIterator<'a> {
|
||||||
return EscapeSequenceOffsetsIterator {
|
EscapeSequenceOffsetsIterator {
|
||||||
text,
|
text,
|
||||||
chars: text.char_indices().peekable(),
|
chars: text.char_indices().peekable(),
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Takes values from the iterator while the predicate returns true.
|
/// Takes values from the iterator while the predicate returns true.
|
||||||
@ -564,10 +564,10 @@ pub struct EscapeSequenceIterator<'a> {
|
|||||||
|
|
||||||
impl<'a> EscapeSequenceIterator<'a> {
|
impl<'a> EscapeSequenceIterator<'a> {
|
||||||
pub fn new(text: &'a str) -> EscapeSequenceIterator<'a> {
|
pub fn new(text: &'a str) -> EscapeSequenceIterator<'a> {
|
||||||
return EscapeSequenceIterator {
|
EscapeSequenceIterator {
|
||||||
text,
|
text,
|
||||||
offset_iter: EscapeSequenceOffsetsIterator::new(text),
|
offset_iter: EscapeSequenceOffsetsIterator::new(text),
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user