Address some minor Clippy complaints.
This commit is contained in:
@@ -21,6 +21,12 @@ impl Builtin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Builtin {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
macro_rules! local_address_impl {
|
macro_rules! local_address_impl {
|
||||||
($t: ty) => {
|
($t: ty) => {
|
||||||
impl HasLocalAddress for $t {
|
impl HasLocalAddress for $t {
|
||||||
@@ -182,7 +188,6 @@ fn check_sanity() {
|
|||||||
let listener_task_handle = async_std::task::spawn(async move {
|
let listener_task_handle = async_std::task::spawn(async move {
|
||||||
let (mut stream, addr, port) = listener.accept().await.expect("Didn't get connection");
|
let (mut stream, addr, port) = listener.accept().await.expect("Didn't get connection");
|
||||||
let mut result_buffer = [0u8; 4];
|
let mut result_buffer = [0u8; 4];
|
||||||
println!("Starting read!");
|
|
||||||
stream
|
stream
|
||||||
.read_exact(&mut result_buffer)
|
.read_exact(&mut result_buffer)
|
||||||
.await
|
.await
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ async fn run_authentication(
|
|||||||
Ok(cg)
|
Ok(cg)
|
||||||
if cg
|
if cg
|
||||||
.acceptable_methods
|
.acceptable_methods
|
||||||
.contains(&&AuthenticationMethod::UsernameAndPassword)
|
.contains(&AuthenticationMethod::UsernameAndPassword)
|
||||||
&& params.check_password.is_some() =>
|
&& params.check_password.is_some() =>
|
||||||
{
|
{
|
||||||
match ClientUsernamePassword::read(Pin::new(&mut stream)).await {
|
match ClientUsernamePassword::read(Pin::new(&mut stream)).await {
|
||||||
@@ -147,7 +147,7 @@ async fn run_authentication(
|
|||||||
|
|
||||||
// and, in the worst case, we'll see if our user is cool with unauthenticated connections
|
// and, in the worst case, we'll see if our user is cool with unauthenticated connections
|
||||||
Ok(cg)
|
Ok(cg)
|
||||||
if cg.acceptable_methods.contains(&&AuthenticationMethod::None)
|
if cg.acceptable_methods.contains(&AuthenticationMethod::None)
|
||||||
&& params.allow_unauthenticated =>
|
&& params.allow_unauthenticated =>
|
||||||
{
|
{
|
||||||
Some(stream)
|
Some(stream)
|
||||||
|
|||||||
Reference in New Issue
Block a user