You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ A color management and conversion library that focuses on maintaining correctnes
15
15
16
16
## Minimum Supported Rust Version (MSRV)
17
17
18
-
This version of Palette has been automatically tested with Rust version `1.48.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will be considered a breaking change.
18
+
This version of Palette has been automatically tested with Rust version `1.51.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will be considered a breaking change.
Copy file name to clipboardexpand all lines: palette/README.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ A color management and conversion library that focuses on maintaining correctnes
16
16
17
17
## Minimum Supported Rust Version (MSRV)
18
18
19
-
This version of Palette has been automatically tested with Rust version `1.48.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will be considered a breaking change.
19
+
This version of Palette has been automatically tested with Rust version `1.51.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will be considered a breaking change.
20
20
21
21
## Getting Started
22
22
@@ -93,16 +93,16 @@ A longer and more advanced example that shows how to implement the conversion tr
93
93
94
94
### Pixels And Buffers
95
95
96
-
When working with image or pixel buffers, or any color type that can be converted to a slice of components (ex. `&[u8]`), the `Pixel` trait provides methods for turning them into slices of Palette colors without cloning the whole buffer:
96
+
When working with image or pixel buffers, or any color type that can be converted to a slice of components (ex. `&[u8]`), the `cast` module provides functions for turning them into slices of Palette colors without cloning the whole buffer:
97
97
98
98
```rust
99
-
usepalette::{Srgb, Pixel};
99
+
usepalette::{cast, Srgb};
100
100
101
101
// The input to this function could be data from an image file or
102
102
// maybe a texture in a game.
103
103
fnswap_red_and_blue(my_rgb_image:&mut [u8]) {
104
104
// Convert `my_rgb_image` into `&mut [Srgb<u8>]` without copying.
0 commit comments