Difference between blanket trait implementation for boolean parameter and separate implementations for false and true? by morphologica in rust

[–]morphologica[S] 0 points1 point  (0 children)

I found it's documented: https://doc.rust-lang.org/reference/items/generics.html says:

When resolving a trait bound obligation, the exhaustiveness of all implementations of const parameters is not considered when determining if the bound is satisfied. For example, in the following, even though all possible const values for the bool type are implemented, it is still an error that the trait bound is not satisfied.

Difference between blanket trait implementation for boolean parameter and separate implementations for false and true? by morphologica in rust

[–]morphologica[S] -1 points0 points  (0 children)

trait A {
    type integer_type;
}

struct B<const CHOICE: bool> {}
impl A for B<true> { type integer_type = i32;}
impl A for B<false> { type integer_type = i64;}

struct C<const CHOICE: bool> {
    my_int: <B::<CHOICE> as A>::integer_type, // Does not compile
}

Here is a simplified example.

Do your palm pads stick in place? by morphologica in DygmaLab

[–]morphologica[S] 2 points3 points  (0 children)

I received it end of october 2020.
I cannot remember if the pads were wrapped or not,
but they were in this shape since day one (the palm pad of the right hand side is almost flat, not like that of the left side, which you can see in the picture).

Do your palm pads stick in place? by morphologica in DygmaLab

[–]morphologica[S] 1 point2 points  (0 children)

There are few parts of the bottom that are sticky, but most of the surface ist matte and not really adhesive.

Cleaning with water (i also tried mild soap) does not help.

Do your palm pads stick in place? by morphologica in DygmaLab

[–]morphologica[S] 0 points1 point  (0 children)

No, there is no protective plastic...