Drop a useless import and use `Self` in return values in Features
[rust-lightning] / lightning / src / ln / features.rs
index 3ce3d4fa7e604b9e0fb979dd8f4da0911adbdda2..c97e18100fc769fd906a201f4868f3e662d21852 100644 (file)
@@ -26,7 +26,6 @@
 //! [`Context`]: sealed/trait.Context.html
 
 use std::{cmp, fmt};
-use std::result::Result;
 use std::marker::PhantomData;
 
 use ln::msgs::DecodeError;
@@ -352,7 +351,7 @@ impl InitFeatures {
 
 impl<T: sealed::Context> Features<T> {
        /// Create a blank Features with no features set
-       pub fn empty() -> Features<T> {
+       pub fn empty() -> Self {
                Features {
                        flags: Vec::new(),
                        mark: PhantomData,
@@ -362,7 +361,7 @@ impl<T: sealed::Context> Features<T> {
        /// Creates features known by the implementation as defined by [`T::KNOWN_FEATURE_FLAGS`].
        ///
        /// [`T::KNOWN_FEATURE_FLAGS`]: sealed/trait.Context.html#associatedconstant.KNOWN_FEATURE_FLAGS
-       pub fn known() -> Features<T> {
+       pub fn known() -> Self {
                Self {
                        flags: T::KNOWN_FEATURE_FLAGS.to_vec(),
                        mark: PhantomData,