diff options
author | Alexander Seiler <seileralex@gmail.com> | 2023-04-26 17:00:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 11:00:22 -0400 |
commit | 37970bd034682579374ebeb8525e597c1e53d130 (patch) | |
tree | 846ca29129f9463ffdb39630f004eba05c948aa9 /src | |
parent | 3e8d1bc9c4dad6499f4d9dd8bb6f0b966b33710e (diff) |
Fix some typos (#1379)
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/align.rs | 8 | ||||
-rw-r--r-- | src/options/set.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/align.rs b/src/align.rs index 90491ce2..edab1954 100644 --- a/src/align.rs +++ b/src/align.rs @@ -4,7 +4,7 @@ use std::collections::VecDeque; const DELETION_COST: usize = 2; const INSERTION_COST: usize = 2; // extra cost for starting a new group of changed tokens -const INITIAL_MISMATCH_PENALITY: usize = 1; +const INITIAL_MISMATCH_PENALTY: usize = 1; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Operation { @@ -61,14 +61,14 @@ impl<'a> Alignment<'a> { self.table[i] = Cell { parent: 0, operation: Deletion, - cost: i * DELETION_COST + INITIAL_MISMATCH_PENALITY, + cost: i * DELETION_COST + INITIAL_MISMATCH_PENALTY, }; } for j in 1..self.dim[0] { self.table[j * self.dim[1]] = Cell { parent: 0, operation: Insertion, - cost: j * INSERTION_COST + INITIAL_MISMATCH_PENALITY, + cost: j * INSERTION_COST + INITIAL_MISMATCH_PENALTY, }; } @@ -118,7 +118,7 @@ impl<'a> Alignment<'a> { self.table[parent].cost + basic_cost + if self.table[parent].operation == NoOp { - INITIAL_MISMATCH_PENALITY + INITIAL_MISMATCH_PENALTY } else { 0 } diff --git a/src/options/set.rs b/src/options/set.rs index f33d8c12..04f7d0e6 100644 --- a/src/options/set.rs +++ b/src/options/set.rs @@ -366,7 +366,7 @@ fn gather_features( } // Gather builtin feature flags supplied on command line. - // TODO: Iterate over programatically-obtained names of builtin features. + // TODO: Iterate over programmatically-obtained names of builtin features. if opt.raw { gather_builtin_features_recursively("raw", &mut features, builtin_features, opt); } |