Skip to content

Commit 98fb46a

Browse files
committed
internal_fingerprint
1 parent 2075b7d commit 98fb46a

File tree

9 files changed

+8
-20
lines changed

9 files changed

+8
-20
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/bencher_context/src/client/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ use std::collections::HashMap;
22

33
use gix::Repository;
44

5-
mod platform;
5+
use crate::{ContextPath, RunContext};
66

7-
pub use platform::Fingerprint;
8-
use platform::OperatingSystem;
7+
mod platform;
98

10-
use crate::{ContextPath, RunContext};
9+
use platform::{Fingerprint, OperatingSystem};
1110

1211
const ROOT: &str = "root";
1312

lib/bencher_context/src/client/platform/fingerprint/linux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use uuid::Uuid;
44

55
const HEX_BASE: u32 = 16;
66

7-
impl crate::Fingerprint {
7+
impl super::Fingerprint {
88
pub fn current() -> Option<Self> {
99
parse_machine_id("/var/lib/dbus/machine-id")
1010
.or_else(|| parse_machine_id("/etc/machine-id"))

lib/bencher_context/src/client/platform/fingerprint/macos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::process::Command;
22

33
use uuid::Uuid;
44

5-
impl crate::Fingerprint {
5+
impl super::Fingerprint {
66
pub fn current() -> Option<Self> {
77
Command::new("ioreg")
88
.arg("-d2")

lib/bencher_context/src/client/platform/fingerprint/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ impl Fingerprint {
3131
}
3232
}
3333

34+
// The maximum number of characters for a base 36 encoded u64 is 13.
35+
const ENCODED_LEN: usize = 13;
3436
fn encode_uuid(uuid: Uuid) -> String {
35-
const ENCODED_LEN: usize = 13;
36-
3737
let base = BASE_36.len() as u64;
3838
let chars = BASE_36.chars().collect::<Vec<_>>();
3939

lib/bencher_context/src/client/platform/fingerprint/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use windows::{
77
Win32::System::Registry::{RegGetValueW, HKEY_LOCAL_MACHINE, RRF_RT_ANY},
88
};
99

10-
impl crate::Fingerprint {
10+
impl super::Fingerprint {
1111
pub fn current() -> Option<Self> {
1212
serial_number().or_else(digital_product_id).map(Self)
1313
}

lib/bencher_context/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ mod client;
99
#[cfg(feature = "server")]
1010
mod server;
1111

12-
#[cfg(feature = "client")]
13-
pub use client::Fingerprint;
14-
1512
const BENCHER_DEV: &str = "bencher.dev";
1613
const VERSION: &str = "v0";
1714

services/cli/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ publish = false
1010
default = ["plus"]
1111
plus = ["bencher_client/plus", "bencher_comment/plus", "bencher_json/plus"]
1212

13-
[build-dependencies]
14-
bencher_context = { workspace = true, features = ["client"] }
15-
1613
[dependencies]
1714
# Workspace
1815
bencher_adapter.workspace = true

services/cli/build.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)