Skip to content

Commit

Permalink
Fix formatting issues
Browse files Browse the repository at this point in the history
Signed-off-by: YouXam <[email protected]>
  • Loading branch information
YouXam committed May 13, 2024
1 parent 74596fa commit 8d8bc9d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/net/bupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum BuptNetStatus {

fn check(url: impl AsRef<str>) -> Result<BuptNetStatus> {
log::debug!("checking bupt network status with url: {}", url.as_ref());
let connection = EspHttpConnection::new(&Configuration{
let connection = EspHttpConnection::new(&Configuration {
follow_redirects_policy: FollowRedirectsPolicy::FollowNone,
..Default::default()
})?;
Expand Down
15 changes: 12 additions & 3 deletions src/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ fn connect_wifi(
match wifi.connect() {
Ok(_) => break,
Err(e) => {
log::warn!("Failed to connect wifi: {}, will retry after 10 seconds...", e);
log::warn!(
"Failed to connect wifi: {}, will retry after 10 seconds...",
e
);
}
}
delay.delay_ms(1000 * 10);
Expand All @@ -66,7 +69,10 @@ fn connect_wifi(
match bupt::login(account.clone()) {
Ok(_) => break,
Err(e) => {
log::warn!("Failed to login to BUPT-portal: {}, will retry after 10 seconds...", e);
log::warn!(
"Failed to login to BUPT-portal: {}, will retry after 10 seconds...",
e
);
}
}
delay.delay_ms(1000 * 10);
Expand Down Expand Up @@ -124,7 +130,10 @@ pub fn connect() -> anyhow::Result<()> {
EspSystemEventLoop::take()?,
)?;

log::info!("Web Test: {}", bupt::get("http://www.msftconnecttest.com/connecttest.txt")?);
log::info!(
"Web Test: {}",
bupt::get("http://www.msftconnecttest.com/connecttest.txt")?
);

Ok(())
}

0 comments on commit 8d8bc9d

Please sign in to comment.