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

feat: Extract normalized dist as metric [INGEST-335] #1158

Merged
merged 5 commits into from
Dec 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ref: Remove Option::
  • Loading branch information
jjbayer committed Dec 16, 2021
commit add8f2d588ce9c56f3f897d89d096c5c25e5a23f
6 changes: 3 additions & 3 deletions relay-general/src/store/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1618,21 +1618,21 @@ fn test_normalize_dist_none() {

#[test]
fn test_normalize_dist_empty() {
let mut dist = Option::Some("".to_owned());
let mut dist = Some("".to_owned());
normalize_dist(&mut dist);
assert_eq!(dist, None);
}

#[test]
fn test_normalize_dist_trim() {
let mut dist = Option::Some(" foo ".to_owned());
let mut dist = Some(" foo ".to_owned());
normalize_dist(&mut dist);
assert_eq!(dist.unwrap(), "foo");
}

#[test]
fn test_normalize_dist_whitespace() {
let mut dist = Option::Some(" ".to_owned());
let mut dist = Some(" ".to_owned());
normalize_dist(&mut dist);
assert_eq!(dist.unwrap(), ""); // Not sure if this is what we want
}