Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/telemetry_core/src/state/counter.rs
Expand Up @@ -17,15 +17,15 @@
use crate::feed_message::Ranking;
use std::collections::HashMap;

/// A data structure which counts how many occurences of a given key we've seen.
/// A data structure which counts how many occurrences of a given key we've seen.
#[derive(Default)]
pub struct Counter<K> {
/// A map containing the number of occurences of a given key.
/// A map containing the number of occurrences of a given key.
///
/// If there are none then the entry is removed.
map: HashMap<K, u64>,

/// The number of occurences where the key is `None`.
/// The number of occurrences where the key is `None`.
empty: u64,
}

Expand All @@ -39,7 +39,7 @@ impl<K> Counter<K>
where
K: Sized + std::hash::Hash + Eq,
{
/// Either adds or removes a single occurence of a given `key`.
/// Either adds or removes a single occurrence of a given `key`.
pub fn modify<'a, Q>(&mut self, key: Option<&'a Q>, op: CounterValue)
where
Q: ?Sized + std::hash::Hash + Eq,
Expand Down
2 changes: 1 addition & 1 deletion backend/telemetry_shard/src/json_message/hash.rs
Expand Up @@ -50,7 +50,7 @@ impl<'de> Visitor<'de> for HashVisitor {

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str(
"byte array of length 32, or hexidecimal string of 32 bytes beginning with 0x",
"byte array of length 32, or hexadecimal string of 32 bytes beginning with 0x",
)
}

Expand Down
2 changes: 1 addition & 1 deletion backend/test_utils/src/lib.rs
Expand Up @@ -21,7 +21,7 @@ pub mod server;
/// is the slightly-lossy inverse of the custom serialization we do to feed messages.
pub mod feed_message_de;

/// A couple of macros to make it easier to test for the presense of things (mainly, feed messages)
/// A couple of macros to make it easier to test for the presence of things (mainly, feed messages)
/// in an iterable container.
#[macro_use]
pub mod contains_matches;
Expand Down