Skip to content

Commit 25f8753

Browse files
committed
switch to edition 2024 and MSRV 1.85
1 parent b219524 commit 25f8753

File tree

14 files changed

+50
-47
lines changed

14 files changed

+50
-47
lines changed

.github/workflows/cargo-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
2121
- name: Run rustfmt
2222
run: |
23-
find . -path ./src/generated -prune -o -name '*.rs' -print | xargs rustup run nightly rustfmt --edition 2021 --check
23+
find . -path ./src/generated -prune -o -name '*.rs' -print | xargs rustup run nightly rustfmt --edition 2024 --check
2424
2525
- name: Set up Python
2626
uses: actions/setup-python@v6.1.0
@@ -39,10 +39,10 @@ jobs:
3939
run: if [[ ! -z `git status --porcelain=v1` ]]; then echo "::error::Workspace is dirty after running generator. Did you remember to check in the generated files?"; exit 1; fi
4040

4141
- name: Install MSRV toolchain
42-
run: rustup install 1.84.0 --profile minimal
42+
run: rustup install 1.85.0 --profile minimal
4343

4444
- name: Run cargo test
45-
run: rustup run 1.84.0 cargo test --all-features
45+
run: rustup run 1.85.0 cargo test --all-features
4646

4747
- name: Run clippy
4848
run: rustup run nightly cargo clippy --all-targets --all-features -- --deny warnings

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "dropbox-sdk"
33
version = "0.19.1"
44
authors = ["Bill Fraser <wfraser@dropbox.com>"]
5-
edition = "2021"
5+
edition = "2024"
66
description = "Rust bindings to the Dropbox API, generated by Stone from the official spec."
77
categories = ["api-bindings"]
88
keywords = ["dropbox", "sdk", "cloud", "storage"]
@@ -11,8 +11,8 @@ license = "Apache-2.0"
1111
readme = "README.md"
1212

1313
# Keep this at least 1 year old.
14-
# 1.84 is required for the MSRV-aware dependency resolver
15-
rust-version = "1.84.0" # Jan 9, 2025
14+
# 1.85 is required for edition 2024
15+
rust-version = "1.85.0" # Feb 20, 2025
1616

1717
[dependencies]
1818
async-lock = ">=3.3.0, <=3.4.1" # remove conditions once MSRV is 1.85

RELEASE_NOTES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# unreleased (v0.19.2)
22
xxxx-yy-zz
3-
* MSRV raised to 1.84.0
3+
* MSRV raised to 1.85.0
4+
* Rust edition switched to 2024
45
* reqwest (default async HTTP client impl) updated from version 0.12 to 0.13
56

67
# v0.19.1

examples/large-file-upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//! files that would not fit in a single HTTP request, including allowing the user to resume
55
//! interrupted uploads, and uploading blocks in parallel.
66
7+
use dropbox_sdk::Error::Api;
78
use dropbox_sdk::default_client::UserAuthDefaultClient;
89
use dropbox_sdk::files;
9-
use dropbox_sdk::Error::Api;
1010
use std::collections::HashMap;
1111
use std::fs::File;
1212
use std::io::{Seek, SeekFrom};

src/async_client_trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Everything needed to implement your async HTTP client.
22
3-
pub use crate::client_trait_common::{HttpRequest, TeamSelect};
43
use crate::Error;
4+
pub use crate::client_trait_common::{HttpRequest, TeamSelect};
55
use bytes::Bytes;
66
use futures::AsyncRead;
7-
use std::future::{ready, Future};
7+
use std::future::{Future, ready};
88
use std::sync::Arc;
99

1010
/// The base HTTP asynchronous client trait.

src/client_helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Copyright (c) 2019-2025 Dropbox, Inc.
22

3+
use crate::Error;
34
use crate::async_client_trait::{HttpClient, HttpRequestResult, HttpRequestResultRaw};
45
use crate::client_trait_common::{Endpoint, HttpRequest, ParamsType, Style, TeamSelect};
56
use crate::types::auth::{AccessError, AuthError, RateLimitReason};
6-
use crate::Error;
77
use bytes::Bytes;
88
use futures::{AsyncRead, AsyncReadExt};
9+
use serde::Deserialize;
910
use serde::de::DeserializeOwned;
1011
use serde::ser::Serialize;
11-
use serde::Deserialize;
1212
use std::error::Error as StdError;
1313
use std::io::ErrorKind;
1414
use std::sync::Arc;
@@ -355,9 +355,9 @@ where
355355

356356
#[cfg(feature = "sync_routes")]
357357
mod sync_helpers {
358+
use crate::Error;
358359
use crate::async_client_trait::{HttpRequestResult, SyncReadAdapter};
359360
use crate::client_trait as sync;
360-
use crate::Error;
361361
use futures::{AsyncRead, FutureExt};
362362
use std::future::Future;
363363

src/client_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
//! Everything needed to implement your HTTP client.
44
5-
pub use crate::client_trait_common::{HttpRequest, TeamSelect};
65
use crate::Error;
6+
pub use crate::client_trait_common::{HttpRequest, TeamSelect};
77
use std::io::Read;
88
use std::sync::Arc;
99

src/default_async_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
//! This code (and its dependencies) are only built if you use the `default_async_client` Cargo
1111
//! feature.
1212
13+
use crate::Error;
1314
use crate::async_client_trait::{
1415
AppAuthClient, HttpClient, HttpRequest, HttpRequestResultRaw, NoauthClient, TeamAuthClient,
1516
TeamSelect, UserAuthClient,
1617
};
1718
use crate::default_client_common::impl_set_path_root;
1819
use crate::oauth2::{Authorization, TokenCache};
19-
use crate::Error;
2020
use bytes::Bytes;
2121
use futures::{FutureExt, TryFutureExt, TryStreamExt};
22-
use std::future::{ready, Future};
22+
use std::future::{Future, ready};
2323
use std::str::FromStr;
2424
use std::sync::Arc;
2525

src/default_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
//!
1212
//! This code (and its dependencies) are only built if you use the `default_client` Cargo feature.
1313
14+
use crate::Error;
1415
use crate::client_trait::{
1516
AppAuthClient, HttpClient, HttpRequest, HttpRequestResultRaw, NoauthClient, TeamAuthClient,
1617
TeamSelect, UserAuthClient,
1718
};
1819
use crate::default_client_common::impl_set_path_root;
1920
use crate::oauth2::{Authorization, TokenCache};
20-
use crate::Error;
2121
use futures::FutureExt;
2222
use std::str::FromStr;
2323
use std::sync::Arc;
24-
use ureq::typestate::WithBody;
2524
use ureq::Agent;
25+
use ureq::typestate::WithBody;
2626

2727
macro_rules! impl_update_token {
2828
($self:ident) => {

src/oauth2.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
//! [Dropbox OAuth Guide]: https://developers.dropbox.com/oauth-guide
1313
//! [OAuth types summary]: https://developers.dropbox.com/oauth-guide#summary
1414
15+
use crate::Error;
1516
use crate::async_client_trait::NoauthClient;
1617
use crate::client_helpers::{parse_response, prepare_request};
1718
use crate::client_trait_common::{Endpoint, ParamsType, Style};
18-
use crate::Error;
1919
use async_lock::RwLock;
20-
use base64::engine::general_purpose::{URL_SAFE, URL_SAFE_NO_PAD};
2120
use base64::Engine;
21+
use base64::engine::general_purpose::{URL_SAFE, URL_SAFE_NO_PAD};
2222
use ring::rand::{SecureRandom, SystemRandom};
2323
use std::env;
2424
use std::io::{self, IsTerminal, Write};
2525
use std::sync::Arc;
26-
use url::form_urlencoded::Serializer as UrlEncoder;
2726
use url::Url;
27+
use url::form_urlencoded::Serializer as UrlEncoder;
2828

2929
/// Which type of OAuth2 flow to use.
3030
#[derive(Debug, Clone)]
@@ -581,7 +581,7 @@ impl Authorization {
581581
_ => {
582582
return Err(Error::UnexpectedResponse(
583583
"no access token in response!".to_owned(),
584-
))
584+
));
585585
}
586586
}
587587
match map.remove("refresh_token") {
@@ -597,7 +597,7 @@ impl Authorization {
597597
_ => {
598598
return Err(Error::UnexpectedResponse(
599599
"response is not a JSON object".to_owned(),
600-
))
600+
));
601601
}
602602
}
603603

0 commit comments

Comments
 (0)