refactor(headers): Use u16 based newtype for quality value
Using floating point numbers is problematic because comparison is inexact. They also take more space than integral numbers in this case. Add `FromPrimitve`, `ToPrimitive` and `Default` traits to quality newtype. Closes: #330 BREAKING_CHANGE: Replace f32 quality values in quality items with a Quality(u16) newtype. Valid values are from 0 to 1000.
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| pub use self::encoding::Encoding; | ||||
| pub use self::entity::EntityTag; | ||||
| pub use self::quality_item::{QualityItem, qitem}; | ||||
| pub use self::quality_item::{Quality, QualityItem, qitem}; | ||||
|  | ||||
| mod encoding; | ||||
| mod entity; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user