-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed clippy warnings and reformat sources.
- Loading branch information
1 parent
1d1f69f
commit eee12c6
Showing
16 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
// | ||
|
||
/******************************************************************************* | ||
* Copyright (c) 2017-2020 Frank Pagliughi <[email protected]> | ||
* Copyright (c) 2017-2022 Frank Pagliughi <[email protected]> | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
|
@@ -187,7 +187,7 @@ impl Default for Message { | |
impl Clone for Message { | ||
/// Create a clone of the message | ||
fn clone(&self) -> Self { | ||
Self::from_data(self.cmsg, (&*self.data).clone()) | ||
Self::from_data(self.cmsg, (*self.data).clone()) | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
// | ||
|
||
/******************************************************************************* | ||
* Copyright (c) 2019-2020 Frank Pagliughi <[email protected]> | ||
* Copyright (c) 2019-2022 Frank Pagliughi <[email protected]> | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
|
@@ -25,7 +25,7 @@ use std::{ffi::CStr, fmt}; | |
|
||
/// MQTT v5 single-byte reason codes. | ||
#[repr(u8)] | ||
#[derive(Clone, Copy, PartialEq, Debug)] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
#[allow(missing_docs)] | ||
pub enum ReasonCode { | ||
Success = 0, // also: NormalDisconnection & GrantedQos0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
// | ||
|
||
/******************************************************************************* | ||
* Copyright (c) 2018-2020 Frank Pagliughi <[email protected]> | ||
* Copyright (c) 2018-2022 Frank Pagliughi <[email protected]> | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
|
@@ -31,17 +31,16 @@ | |
//! combined with any other Rust futures. | ||
//! | ||
|
||
use std::ffi::CStr; | ||
|
||
use crate::{ffi, from_c_bool, properties::Properties, reason_code::ReasonCode}; | ||
use std::ffi::CStr; | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// ServerRequest | ||
|
||
/// The server requests that expect a response. | ||
/// This is required because the `alt` union of the MQTTAsync_successData | ||
/// struct from C library doesn't indicate which field is valid. | ||
#[derive(Clone, Copy, PartialEq, Debug)] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum ServerRequest { | ||
/// No response expected from the server | ||
None, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
// | ||
|
||
/******************************************************************************* | ||
* Copyright (c) 2017-2020 Frank Pagliughi <[email protected]> | ||
* Copyright (c) 2017-2022 Frank Pagliughi <[email protected]> | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
|
@@ -69,7 +69,7 @@ struct SslOptionsData { | |
|
||
/// The SSL/TLS versions that can be requested. | ||
#[repr(u32)] | ||
#[derive(Clone, Copy, PartialEq, Debug)] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum SslVersion { | ||
/// The default library SSL/TLS version | ||
Default = ffi::MQTT_SSL_VERSION_DEFAULT, | ||
|
@@ -200,7 +200,7 @@ impl Default for SslOptions { | |
|
||
impl Clone for SslOptions { | ||
fn clone(&self) -> Self { | ||
Self::from_data(self.copts, (&*self.data).clone()) | ||
Self::from_data(self.copts, (*self.data).clone()) | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// will_options.rs | ||
// | ||
// This file is part of the Eclipse Paho MQTT Rust Client library. | ||
// | ||
|
||
/******************************************************************************* | ||
* Copyright (c) 2017-2019 Frank Pagliughi <[email protected]> | ||
* Copyright (c) 2017-2022 Frank Pagliughi <[email protected]> | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
|
@@ -172,7 +173,7 @@ impl Clone for WillOptions { | |
/// This clones the cached values and updates the C struct to refer | ||
/// to them. | ||
fn clone(&self) -> Self { | ||
Self::from_data(self.copts, (&*self.data).clone()) | ||
Self::from_data(self.copts, (*self.data).clone()) | ||
} | ||
} | ||
|
||
|