pchampin / mownstr

MownStr: Maybe Owned String
1 stars 2 forks source link

Call module member instead of type #2

Closed keorn closed 4 years ago

keorn commented 4 years ago

This probably needs rebasing on top of 0.1.1, but fixes compilation issue:

   |
23 | const LEN_MASK: usize = usize::MAX >> 1;
   |                                ^^^ associated item not found in `usize`
   |
help: you are looking for the module in `std`, not the primitive type
   |
23 | const LEN_MASK: usize = std::usize::MAX >> 1;
   |                         ^^^^^^^^^^^^^^^
pchampin commented 4 years ago

Which version of the compiler are you using?

According to the documentation the change you propose (std::usize::MAX) is deprecated, and the current code (usize::MAX) is the recommended way.

keorn commented 4 years ago

Right, thanks for the pointer. Will investigate.