Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ remove_trailing_decimal_point
Function
remove_trailing_decimal_point
crates/literal/src/float.rs:118–124 ·
view source on GitHub ↗
(s: String)
Source
from the content-addressed store, hash-verified
116
}
117
118
fn remove_trailing_decimal_point(s: String) -> String {
119
let mut s = s;
120
if s.ends_with(
'.'
) {
121
s.pop();
122
}
123
s
124
}
125
126
pub fn format_general(
127
precision: usize,
Callers
1
maybe_remove_trailing_redundant_chars
Function · 0.85
Calls
2
ends_with
Method · 0.80
pop
Method · 0.45
Tested by
no test coverage detected