Skip to content

Commit 1ca071e

Browse files
committed
chore: Correct typo, travelled→traveled
1 parent 484b6cf commit 1ca071e

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ extend-ignore-re = [
5555
]
5656

5757
[workspace.metadata.typos.default.extend-words]
58-
travelled = "travelled" # sadly part of a public API and fixing would be a breaking change
59-
nd = "nd" # appears frequently in inline test messages
58+
nd = "nd" # appears frequently in inline test messages
6059

6160
[workspace.metadata.typos.files]
6261
ignore-hidden = false

fluent-bundle/src/resolver/scope.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct Scope<'bundle, 'ast, 'args, 'errors, R, M> {
1919
/// Laughs and Quadratic Blowup attacks.
2020
pub(super) placeables: u8,
2121
/// Tracks hashes to prevent infinite recursion.
22-
travelled: smallvec::SmallVec<[&'ast ast::Pattern<&'bundle str>; 2]>,
22+
traveled: smallvec::SmallVec<[&'ast ast::Pattern<&'bundle str>; 2]>,
2323
/// Track errors accumulated during resolving.
2424
pub errors: Option<&'errors mut Vec<FluentError>>,
2525
/// Makes the resolver bail.
@@ -37,7 +37,7 @@ impl<'bundle, 'ast, 'args, 'errors, R, M> Scope<'bundle, 'ast, 'args, 'errors, R
3737
args,
3838
local_args: None,
3939
placeables: 0,
40-
travelled: Default::default(),
40+
traveled: Default::default(),
4141
errors,
4242
dirty: false,
4343
}
@@ -65,8 +65,8 @@ impl<'bundle, 'ast, 'args, 'errors, R, M> Scope<'bundle, 'ast, 'args, 'errors, R
6565
W: fmt::Write,
6666
M: MemoizerKind,
6767
{
68-
if self.travelled.is_empty() {
69-
self.travelled.push(pattern);
68+
if self.traveled.is_empty() {
69+
self.traveled.push(pattern);
7070
}
7171
exp.write(w, self)?;
7272
if self.dirty {
@@ -89,15 +89,15 @@ impl<'bundle, 'ast, 'args, 'errors, R, M> Scope<'bundle, 'ast, 'args, 'errors, R
8989
W: fmt::Write,
9090
M: MemoizerKind,
9191
{
92-
if self.travelled.contains(&pattern) {
92+
if self.traveled.contains(&pattern) {
9393
self.add_error(ResolverError::Cyclic);
9494
w.write_char('{')?;
9595
exp.write_error(w)?;
9696
w.write_char('}')
9797
} else {
98-
self.travelled.push(pattern);
98+
self.traveled.push(pattern);
9999
let result = pattern.write(w, self);
100-
self.travelled.pop();
100+
self.traveled.pop();
101101
result
102102
}
103103
}

0 commit comments

Comments
 (0)