projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add derives where they make sense and the bindings require them
[rust-lightning]
/
lightning
/
src
/
util
/
string.rs
diff --git
a/lightning/src/util/string.rs
b/lightning/src/util/string.rs
index 3e5942f6f04c13b77ceae9401355f86c249bb346..ab12486a0d8ebfbac985dd3289b8e6dbeb23f3f2 100644
(file)
--- a/
lightning/src/util/string.rs
+++ b/
lightning/src/util/string.rs
@@
-9,14
+9,16
@@
//! Utilities for strings.
//! Utilities for strings.
-use alloc::string::String;
use core::fmt;
use crate::io::{self, Read};
use crate::ln::msgs;
use crate::util::ser::{Writeable, Writer, Readable};
use core::fmt;
use crate::io::{self, Read};
use crate::ln::msgs;
use crate::util::ser::{Writeable, Writer, Readable};
+#[allow(unused_imports)]
+use crate::prelude::*;
+
/// Struct to `Display` fields in a safe way using `PrintableString`
/// Struct to `Display` fields in a safe way using `PrintableString`
-#[derive(Clone, Debug, PartialEq, Eq)]
+#[derive(Clone, Debug, PartialEq, Eq
, Hash, PartialOrd, Ord, Default
)]
pub struct UntrustedString(pub String);
impl Writeable for UntrustedString {
pub struct UntrustedString(pub String);
impl Writeable for UntrustedString {