MCPcopy Create free account
hub / github.com/Vulae/pkmc / parse_auto_zeroize

Method parse_auto_zeroize

pkmc-server/src/command.rs:97–99  ·  view source on GitHub ↗
(str: &str)

Source from the content-addressed store, hash-verified

95impl CommandParsable for CommandParsableCoordinate {
96 fn parse(parser: &mut CommandParser<'_>) -> Result<Self, CommandParseError> {
97 fn parse_auto_zeroize(str: &str) -> Result<f64, CommandParseError> {
98 Ok(if str.is_empty() { 0.0 } else { str.parse()? })
99 }
100
101 fn parse_with_relative(str: &str) -> Result<(f64, bool), CommandParseError> {
102 if let Some(stripped) = str.strip_prefix('~') {

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected