В
[patch.crates-io]
bar = { git = '...' }
Size: a a a
В
[patch.crates-io]
bar = { git = '...' }
В
[patch]
указывают git: https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-sectionМЛ
pub(crate) type CError = Box<dyn std::error::Error>;
pub(crate) type CResult<T> = Result<T, CError>;
pub(crate) fn errors_from_results(results: Vec<CResult<()>>) -> CResult<()> {
let errs: Vec<CError> = results.into_iter().filter_map(CResult::<()>::err).collect();
Ok(())
}
pub(crate) type CError = Box<dyn std::error::Error>;
pub(crate) type CResult<T> = Result<T, CError>;
pub(crate) fn errors_from_results<T>(results: T) -> CResult<()>
where
for<'a> &'a T: IntoIterator<Item = &'a CResult<()>>,
{
let errs: Vec<CError> = results.into_iter().filter_map(CResult::<()>::err).collect();
Ok(())
}
32 | let errs: Vec<CError> = results.into_iter().filter_map(CResult::<()>::err).collect();
| ^^^^^^^^^^^^^^^^^^
| |
| expected signature of 'fn(&std::result::Result<(), std::boxed::Box<(dyn std::error::Error + 'static)>>) -> _'
| found signature of 'fn(std::result::Result<(), std::boxed::Box<dyn std::error::Error>>) -> _'
МЛ
В
[replace]
поможет кстати @folexeyyf
[patch.crates-io]
bar = { git = '...' }
f
f
В
[patch.'https://...']
libp2p_core = { path = './core' }
В
f
MV
MV
МЛ
pub(crate) type CError = Box<dyn std::error::Error>;
pub(crate) type CResult<T> = Result<T, CError>;
pub(crate) fn errors_from_results(results: Vec<CResult<()>>) -> CResult<()> {
let errs: Vec<CError> = results.into_iter().filter_map(CResult::<()>::err).collect();
Ok(())
}
pub(crate) type CError = Box<dyn std::error::Error>;
pub(crate) type CResult<T> = Result<T, CError>;
pub(crate) fn errors_from_results<T>(results: T) -> CResult<()>
where
for<'a> &'a T: IntoIterator<Item = &'a CResult<()>>,
{
let errs: Vec<CError> = results.into_iter().filter_map(CResult::<()>::err).collect();
Ok(())
}
32 | let errs: Vec<CError> = results.into_iter().filter_map(CResult::<()>::err).collect();
| ^^^^^^^^^^^^^^^^^^
| |
| expected signature of 'fn(&std::result::Result<(), std::boxed::Box<(dyn std::error::Error + 'static)>>) -> _'
| found signature of 'fn(std::result::Result<(), std::boxed::Box<dyn std::error::Error>>) -> _'
VG
f
VG
МЛ
f
cargo update -p package
– оч полезная штука