Skip to content

Commit f1e76bb

Browse files
authored
chore(*): Rename Wpa2Passphrase to WpaPsk (#96)
* Rename Wpa2Passphrase to WpaPsk * Update toolchain * Formatting
1 parent c7292b6 commit f1e76bb

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "1.80"
2+
channel = "1.83"
33
components = [ "rust-src", "rustfmt", "llvm-tools" ]
44
targets = [
55
"thumbv6m-none-eabi",

src/asynch/control.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ impl<'a, const INGRESS_BUF_SIZE: usize, const URC_CAPACITY: usize>
443443
})
444444
.await?;
445445
}
446-
WifiAuthentication::Wpa2Passphrase(passphrase) => {
446+
WifiAuthentication::WpaPsk(passphrase) => {
447447
(&self.at_client)
448448
.send_retry(&SetWifiAPConfig {
449449
ap_config_id: AccessPointId::Id0,
@@ -548,7 +548,7 @@ impl<'a, const INGRESS_BUF_SIZE: usize, const URC_CAPACITY: usize>
548548
})
549549
.await?;
550550
}
551-
WifiAuthentication::Wpa2Passphrase(passphrase) => {
551+
WifiAuthentication::WpaPsk(passphrase) => {
552552
(&self.at_client)
553553
.send_retry(&SetWifiStationConfig {
554554
config_id: CONFIG_ID,

src/asynch/runner.rs

-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ where
212212
Ok(())
213213
}
214214
Either::First(r) => r.map(drop),
215-
Either::Second(_) => unreachable!(),
216215
}
217216
}
218217

@@ -325,7 +324,6 @@ where
325324
.await
326325
{
327326
Either::First(r) => r?,
328-
Either::Second(_) => unreachable!(),
329327
}
330328

331329
self.ch.mark_initialized();

src/asynch/ublox_stack/tcp.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,10 @@ pub mod client {
698698
for TcpClient<'d, INGRESS_BUF_SIZE, URC_CAPACITY, N, TX_SZ, RX_SZ>
699699
{
700700
type Error = Error;
701-
type Connection<'m> = TcpConnection<'m, N, TX_SZ, RX_SZ> where Self: 'm;
701+
type Connection<'m>
702+
= TcpConnection<'m, N, TX_SZ, RX_SZ>
703+
where
704+
Self: 'm;
702705

703706
async fn connect<'a>(
704707
&'a self,

src/asynch/ublox_stack/tls.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,10 @@ pub mod client {
348348
for TlsClient<'d, INGRESS_BUF_SIZE, URC_CAPACITY, N, TX_SZ, RX_SZ>
349349
{
350350
type Error = Error;
351-
type Connection<'m> = TlsConnection<'m, N, TX_SZ, RX_SZ> where Self: 'm;
351+
type Connection<'m>
352+
= TlsConnection<'m, N, TX_SZ, RX_SZ>
353+
where
354+
Self: 'm;
352355

353356
async fn connect<'a>(
354357
&'a self,

src/options.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ impl HotspotOptions {
6666
pub enum WifiAuthentication<'a> {
6767
#[default]
6868
None,
69-
Wpa2Passphrase(&'a str),
70-
// Wpa2Psk(&'a [u8; 32]),
69+
WpaPsk(&'a str),
70+
// WpaEap(todo!()),
7171
}
7272

7373
impl<'a> From<&'a str> for WifiAuthentication<'a> {
7474
fn from(s: &'a str) -> Self {
75-
Self::Wpa2Passphrase(s)
75+
Self::WpaPsk(s)
7676
}
7777
}
7878

@@ -106,8 +106,8 @@ impl<'a> ConnectionOptions<'a> {
106106
self
107107
}
108108

109-
pub fn wpa2_passphrase(mut self, password: &'a str) -> Self {
110-
self.auth = WifiAuthentication::Wpa2Passphrase(password);
109+
pub fn wpa_psk(mut self, passphrase: &'a str) -> Self {
110+
self.auth = WifiAuthentication::WpaPsk(passphrase);
111111
self
112112
}
113113

0 commit comments

Comments
 (0)