АК
я не собираюсь этот трейт куда-то передавать, он исключительно для добавления метода-хелпера в &[u8]
Size: a a a
АК
r
trait Foo {
fn foo(self, index: std::slice::SliceIndex<Self, Output = ???>);
}
impl Foo for &[u8] {
???
}
АК
K
trait Foo {
fn foo(self, index: std::slice::SliceIndex<Self, Output = ???>);
}
impl Foo for &[u8] {
???
}
trait Foo<T: ?Sized> {
fn foo<I: SliceIndex<Self, Output = T>>(&self, index: I);
}
impl Foo<[u8]> for [u8] {
fn foo<I: SliceIndex<Self, Output = [u8]>>(&self, index: I) {
self.get(index);
}
}
АК
trait Foo<T: ?Sized> {
fn foo<I: SliceIndex<Self, Output = T>>(&self, index: I);
}
impl Foo<[u8]> for [u8] {
fn foo<I: SliceIndex<Self, Output = [u8]>>(&self, index: I) {
self.get(index);
}
}
AT
let mut result: HashSet<BigUint> = solutions
.into_iter()
.reduce(|x, y|
x.intersection(&y).collect())
.unwrap();
std::collections::HashSet<num_bigint::BigUint>
cannot be built from std::iter::Iterator<Item=&num_bigint::BigUint>
AT
result.drain().collect()[0]
K
K
AT
K
K
x.intersection(&y).cloned().collect()
AT
x.intersection(&y).cloned().collect()
&std::collections::HashSet<num_bigint::BigUint>
cannot be built from std::iter::Iterator<Item=num_bigint::BigUint>
std::collections::HashSet
, found referenceK
try_fold
попробовать переделать, либо просто склонировать solutions
Z
Z
AT
K
d
K
#[link(..)]
должен уметь работать с dll-ками, не?