Skip to content

Commit d88b552

Browse files
author
daniel.eades
committed
fixup
1 parent 774b61f commit d88b552

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cSpell.words": [
3+
"clippy",
4+
"thiserror"
5+
]
6+
}

examples/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn round_trip_string<M>(model: M, input: &str)
4848
where
4949
M: Model<Symbol = char> + Clone,
5050
{
51-
let input_bytes = input.bytes().len();
51+
let input_bytes = input.len();
5252

5353
let buffer = encode(model.clone(), input.chars());
5454

examples/sherlock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn main() {
5757
let mut file = File::open("./resources/sherlock.txt").unwrap();
5858
let mut input = String::new();
5959
file.read_to_string(&mut input).unwrap();
60-
let input_bytes = input.bytes().len();
60+
let input_bytes = input.len();
6161

6262
let model = StringModel::new(ALPHABET.chars().collect());
6363

src/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ where
102102
/// Return an iterator over the decoded symbols.
103103
///
104104
/// The iterator will continue returning symbols until EOF is reached
105-
pub fn decode_all(&mut self) -> DecodeIter<M, R> {
105+
pub const fn decode_all(&mut self) -> DecodeIter<M, R> {
106106
DecodeIter { decoder: self }
107107
}
108108

0 commit comments

Comments
 (0)