Skip to content

Bug: error message string "{vn}" is not interpolated #9

Description

@fasuizu-br

Description

In src/lib.rs, the error message for wrong SNTP version uses {vn} as a literal string instead of interpolating the variable:

return Err(Error::new(
    ErrorKind::Other,
    "Server returned wrong SNTP version {vn}, expected 4.",
));

This will output the literal text {vn} instead of the actual version number.

Suggested fix

Wrap with format!():

return Err(Error::new(
    ErrorKind::Other,
    format!("Server returned wrong SNTP version {vn}, expected 4."),
));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions