`Result` is in the standard prelude, so no need to ever use it.
Sadly, returning a Features<T> in the `impl Futures {}` block
will confuse our new alias-impl-printing logic, as we end up
running through the normal impl-block-printing logic as if we had
an explicit `impl ConcreteFeatures` block.
//! [`Context`]: sealed/trait.Context.html
use std::{cmp, fmt};
//! [`Context`]: sealed/trait.Context.html
use std::{cmp, fmt};
-use std::result::Result;
use std::marker::PhantomData;
use ln::msgs::DecodeError;
use std::marker::PhantomData;
use ln::msgs::DecodeError;
impl<T: sealed::Context> Features<T> {
/// Create a blank Features with no features set
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,
Features {
flags: Vec::new(),
mark: PhantomData,
/// 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
/// 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,
Self {
flags: T::KNOWN_FEATURE_FLAGS.to_vec(),
mark: PhantomData,