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

Use thousands separators when formatting seconds #6212

Merged
merged 5 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ extend-exclude = [
".typos.toml",
"crates/re_ui/data/design_tokens.json",
"crates/re_ui/src/design_tokens.rs",
"docs/cspell.json",
"examples/assets",
"rerun_cpp/src/rerun/third_party/cxxopts.hpp",
]
Expand Down
37 changes: 0 additions & 37 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,6 @@
"files.autoGuessEncoding": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"cSpell.ignorePaths": [
".vscode",
"pixi.lock"
],
"cSpell.words": [
"andreas",
"bbox",
"bindgroup",
"colormap",
"emath",
"flatbuffers",
"framebuffer",
"Frazzoli",
"hoverable",
"ilog",
"jumpflooding",
"Karaman",
"Keypoint",
"memoffset",
"nyud",
"objectron",
"Readback",
"readbacks",
"Skybox",
"smallvec",
"swapchain",
"texcoord",
"texcoords",
"Tonemapper",
"tonemapping",
"unsmoothed",
"visualizable",
"visualizability",
"voronoi",
"vram",
"Wgsl"
],
// don't share a cargo lock with rust-analyzer.
// see https://github.com/rerun-io/rerun/pull/519 for rationale
"rust-analyzer.check.overrideCommand": [
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Blueprints are currently only supported in the Python API, with C++ and Rust sup
This release is identical to 0.14.0 and merely fixes an issue in the build artifacts for C++:
0.14.0 only contained binaries for Linux x64, this release has the full set for Linux x64, Windows x64, Mac x64 & Mac Arm64.

## [0.14.0](https://github.com/rerun-io/rerun/compare/0.13.0...0.14.0) - "Unlimited" point clouds & lines, quality of life improvements, bugfixes - 2024-02-28

## [0.14.0](https://github.com/rerun-io/rerun/compare/0.13.0...0.14.0) - "Unlimited" point clouds & lines, quality of life improvements, bugfixes - 2024-02-28

### ✨ Overview & highlights
Expand Down
10 changes: 5 additions & 5 deletions crates/re_log_types/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ impl Time {
let secs = nanos_since_epoch as f64 * 1e-9;

let is_whole_second = nanos_since_epoch % 1_000_000_000 == 0;
if is_whole_second {
format!("{secs:+.0}s")
} else {
format!("{secs:+.3}s")
}

let secs = re_format::FloatFormatOptions::DEFAULT_f64
.with_decimals(if is_whole_second { 0 } else { 3 })
.format(secs);
format!("{secs}s")
}
}

Expand Down
8 changes: 4 additions & 4 deletions crates/re_sdk/src/recording_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ impl RecordingStream {
flush_timeout: Option<std::time::Duration>,
) {
if forced_sink_path().is_some() {
re_log::debug!("Ignored setting new TcpSink since _RERUN_FORCE_SINK is set");
re_log::debug!("Ignored setting new TcpSink since {ENV_FORCE_SAVE} is set");
return;
}

Expand Down Expand Up @@ -1571,7 +1571,7 @@ impl RecordingStream {
return Ok(());
}
if forced_sink_path().is_some() {
re_log::debug!("Ignored setting new TcpSink since _RERUN_FORCE_SINK is set");
re_log::debug!("Ignored setting new TcpSink since {ENV_FORCE_SAVE} is set");
return Ok(());
}

Expand Down Expand Up @@ -1620,7 +1620,7 @@ impl RecordingStream {
path: impl Into<std::path::PathBuf>,
) -> Result<(), crate::sink::FileSinkError> {
if forced_sink_path().is_some() {
re_log::debug!("Ignored setting new file since _RERUN_FORCE_SINK is set");
re_log::debug!("Ignored setting new file since {ENV_FORCE_SAVE} is set");
return Ok(());
}

Expand Down Expand Up @@ -1656,7 +1656,7 @@ impl RecordingStream {
/// Blueprints are currently an experimental part of the Rust SDK.
pub fn stdout_opts(&self) -> Result<(), crate::sink::FileSinkError> {
if forced_sink_path().is_some() {
re_log::debug!("Ignored setting new file since _RERUN_FORCE_SINK is set");
re_log::debug!("Ignored setting new file since {ENV_FORCE_SAVE} is set");
return Ok(());
}

Expand Down
2 changes: 2 additions & 0 deletions crates/re_types_builder/src/codegen/rust/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ fn quote_enum(
}
}

// We implement `Display` to match the `PascalCase` name so that
// the enum variants are displayed in the UI exactly how they are displayed in code.
impl std::fmt::Display for #name {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Expand Down
Loading