rust: fix inherent to string

Bug: OISF#4618
pull/6552/head
Modupe Falodun 4 years ago committed by Victor Julien
parent 922a453da5
commit 74c39500c3

@ -62,7 +62,6 @@
#![allow(clippy::branches_sharing_code)]
#![allow(clippy::while_let_loop)]
#![allow(clippy::redundant_pattern_matching)]
#![allow(clippy::inherent_to_string)]
#![allow(clippy::field_reassign_with_default)]
#![allow(clippy::collapsible_match)]

@ -15,6 +15,7 @@
* 02110-1301, USA.
*/
use std::fmt;
use nom::IResult;
use nom::combinator::rest;
use nom::number::streaming::{le_u8, le_u16, le_u32};
@ -27,9 +28,9 @@ pub struct NTLMSSPVersion {
pub ver_ntlm_rev: u8,
}
impl NTLMSSPVersion {
pub fn to_string(&self) -> String {
format!("{}.{} build {} rev {}",
impl fmt::Display for NTLMSSPVersion {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}.{} build {} rev {}",
self.ver_major, self.ver_minor,
self.ver_build, self.ver_ntlm_rev)
}

Loading…
Cancel
Save