Skip to content

Commit b4c4e39

Browse files
committed
Fix MSRV issues.
- need at least 1.78 for Cargo.lock v4 - fix lifetime specs to avoid modern clippy issues that MSRV clippy has no lint for. - reflect new MSRV in workflow.
1 parent cb2a4a0 commit b4c4e39

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install rust MSRV
4949
uses: actions-rust-lang/setup-rust-toolchain@v1
5050
with:
51-
toolchain: 1.70
51+
toolchain: 1.78
5252
components: clippy
5353

5454
- name: Clippy check

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
99
name = "dbus-secret-service"
1010
version = "4.1.0"
1111
edition = "2021"
12-
rust-version = "1.70"
12+
rust-version = "1.78" # required for Cargo.lock v4
1313
exclude = [".github/"]
1414

1515
[features]

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ impl SecretService {
233233
}
234234

235235
/// Get all collections
236-
#[allow(mismatched_lifetime_syntaxes)]
237-
pub fn get_all_collections(&self) -> Result<Vec<Collection>, Error> {
236+
pub fn get_all_collections(&'_ self) -> Result<Vec<Collection<'_>>, Error> {
238237
let paths = self.proxy().collections()?;
239238
let collections = paths
240239
.into_iter()
@@ -248,8 +247,7 @@ impl SecretService {
248247
/// The most common would be the `default` alias, but there
249248
/// is also a specific method for getting the collection
250249
/// by default alias.
251-
#[allow(mismatched_lifetime_syntaxes)]
252-
pub fn get_collection_by_alias(&self, alias: &str) -> Result<Collection, Error> {
250+
pub fn get_collection_by_alias(&'_ self, alias: &str) -> Result<Collection<'_>, Error> {
253251
let path = self.proxy().read_alias(alias)?;
254252
if path == Path::new("/")? {
255253
Err(Error::NoResult)

0 commit comments

Comments
 (0)