Manually ignore warnings
This commit is contained in:
parent
0ced2c3c44
commit
f639082205
10 changed files with 26 additions and 27 deletions
|
|
@ -11,13 +11,13 @@ pub struct BucketQueue<Item> {
|
|||
impl<Item> std::fmt::Debug for BucketQueue<Item> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
struct DebugWrapper2<'a, I>(&'a Vec<(usize, I)>);
|
||||
impl<'a, I> std::fmt::Debug for DebugWrapper2<'a, I> {
|
||||
impl<I> std::fmt::Debug for DebugWrapper2<'_, I> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_list().entries(self.0.iter().map(|v| v.0)).finish()
|
||||
}
|
||||
}
|
||||
struct DebugWrapper<'a, I>(&'a VecDeque<Vec<(usize, I)>>);
|
||||
impl<'a, I> std::fmt::Debug for DebugWrapper<'a, I> {
|
||||
impl<I> std::fmt::Debug for DebugWrapper<'_, I> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_list()
|
||||
.entries(self.0.iter().map(|v| DebugWrapper2(v)))
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub fn greedy_set_cover_simple<S>(universe: usize, sets: &[S]) -> Vec<usize>
|
|||
where
|
||||
S: Deref<Target = [usize]>,
|
||||
{
|
||||
assert!(sets.len() > 0);
|
||||
assert!(!sets.is_empty());
|
||||
|
||||
let mut r = Vec::new();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ impl<N> QueueObject<N> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<N> Into<i64> for &QueueObject<N> {
|
||||
fn into(self) -> i64 {
|
||||
self.score
|
||||
impl<N> From<&QueueObject<N>> for i64 {
|
||||
fn from(val: &QueueObject<N>) -> Self {
|
||||
val.score
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue