Skip to content

Commit 035af58

Browse files
committed
Remove #[momo] where it does not compile
This fixes: error: Couldn't apply a single conversion - momo is ineffective here --> gix\src\reference\iter.rs:44:5 | 44 | /// Return an iterator over all references that match the given `prefix`. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Couldn't apply a single conversion - momo is ineffective here --> gix\src\config\snapshot\access.rs:28:5 | 28 | /// Like [`boolean()`][Self::boolean()], but it will report an error if the value couldn't be interpreted as boolean. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Couldn't apply a single conversion - momo is ineffective here --> gix\src\config\snapshot\access.rs:44:5 | 44 | /// Like [`integer()`][Self::integer()], but it will report an error if the value couldn't be interpreted as boolean. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Couldn't apply a single conversion - momo is ineffective here --> gix\src\config\snapshot\access.rs:50:5 | 50 | /// Return the string at `key`, or `None` if there is no such value. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Couldn't apply a single conversion - momo is ineffective here --> gix\src\config\snapshot\access.rs:58:5 | 58 | /// Return the trusted and fully interpolated path at `key`, or `None` if there is no such value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Couldn't apply a single conversion - momo is ineffective here --> gix\src\config\snapshot\access.rs:69:5 | 69 | /// Return the trusted string at `key` for launching using [command::prepare()](gix_command::prepare()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `gix_path::RelativePath` --> gix\src\reference\iter.rs:5:5 | 5 | use gix_path::RelativePath; | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused imports: `borrow::Cow` and `ffi::OsStr` --> gix\src\config\snapshot\access.rs:2:11 | 2 | use std::{borrow::Cow, ffi::OsStr}; | ^^^^^^^^^^^ ^^^^^^^^^^ error[E0599]: no method named `trusted_path` found for struct `config::Snapshot<'_>` in the current scope --> gix\src\repository\mailmap.rs:70:14 | 68 | let configured_path = self | _______________________________- 69 | | .config_snapshot() 70 | | .trusted_path(&Mailmap::FILE) | | -^^^^^^^^^^^^ method not found in `Snapshot<'_>` | |_____________| | | ::: gix\src\config\mod.rs:20:1 | 20 | pub struct Snapshot<'repo> { | -------------------------- method `trusted_path` not found for this struct error[E0599]: no method named `try_boolean` found for reference `&config::Snapshot<'repo>` in the current scope --> gix\src\config\snapshot\access.rs:25:14 | 25 | self.try_boolean(key).and_then(Result::ok) | ^^^^^^^^^^^ | help: there is a method `boolean` with a similar name | 25 - self.try_boolean(key).and_then(Result::ok) 25 + self.boolean(key).and_then(Result::ok) | error[E0599]: no method named `try_integer` found for reference `&config::Snapshot<'repo>` in the current scope --> gix\src\config\snapshot\access.rs:41:14 | 41 | self.try_integer(key).and_then(Result::ok) | ^^^^^^^^^^^ | help: there is a method `integer` with a similar name | 41 - self.try_integer(key).and_then(Result::ok) 41 + self.integer(key).and_then(Result::ok) | For more information about this error, try `rustc --explain E0599`.
1 parent 8a57be8 commit 035af58

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

gix/src/config/snapshot/access.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ impl<'repo> Snapshot<'repo> {
2626
}
2727

2828
/// Like [`boolean()`][Self::boolean()], but it will report an error if the value couldn't be interpreted as boolean.
29-
#[momo]
3029
pub fn try_boolean(&self, key: impl gix_config::AsKey) -> Option<Result<bool, gix_config::value::Error>> {
3130
self.repo.config.resolved.boolean(key)
3231
}
@@ -42,23 +41,20 @@ impl<'repo> Snapshot<'repo> {
4241
}
4342

4443
/// Like [`integer()`][Self::integer()], but it will report an error if the value couldn't be interpreted as boolean.
45-
#[momo]
4644
pub fn try_integer(&self, key: impl gix_config::AsKey) -> Option<Result<i64, gix_config::value::Error>> {
4745
self.repo.config.resolved.integer(key)
4846
}
4947

5048
/// Return the string at `key`, or `None` if there is no such value.
5149
///
5250
/// Note that this method takes the most recent value at `key` even if it is from a file with reduced trust.
53-
#[momo]
5451
pub fn string(&self, key: impl gix_config::AsKey) -> Option<Cow<'repo, BStr>> {
5552
self.repo.config.resolved.string(key)
5653
}
5754

5855
/// Return the trusted and fully interpolated path at `key`, or `None` if there is no such value
5956
/// or if no value was found in a trusted file.
6057
/// An error occurs if the path could not be interpolated to its final value.
61-
#[momo]
6258
pub fn trusted_path(
6359
&self,
6460
key: impl gix_config::AsKey,
@@ -68,7 +64,6 @@ impl<'repo> Snapshot<'repo> {
6864

6965
/// Return the trusted string at `key` for launching using [command::prepare()](gix_command::prepare()),
7066
/// or `None` if there is no such value or if no value was found in a trusted file.
71-
#[momo]
7267
pub fn trusted_program(&self, key: impl gix_config::AsKey) -> Option<Cow<'repo, OsStr>> {
7368
let value = self
7469
.repo

gix/src/reference/iter.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//!
22
#![allow(clippy::empty_docs)]
33

4-
use gix_macros::momo;
54
use gix_path::RelativePath;
65
use gix_ref::file::ReferenceExt;
76

@@ -44,7 +43,6 @@ impl Platform<'_> {
4443
/// Return an iterator over all references that match the given `prefix`.
4544
///
4645
/// These are of the form `refs/heads/` or `refs/remotes/origin`, and must not contain relative paths components like `.` or `..`.
47-
#[momo]
4846
pub fn prefixed<'a>(
4947
&self,
5048
prefix: impl TryInto<&'a RelativePath, Error = gix_path::relative_path::Error>,

0 commit comments

Comments
 (0)