Rename image::Handle::from_bytes to from_memory

Also, replace `image` example with a new `pokedex` example using the
PokéAPI.
This commit is contained in:
Héctor Ramón Jiménez 2019-12-04 03:55:33 +01:00
parent 1747eb2745
commit 4293dcb254
4 changed files with 236 additions and 203 deletions

View file

@ -126,8 +126,11 @@ impl Handle {
/// Creates an image [`Handle`] containing the image data directly.
///
/// This is useful if you already have your image loaded in-memory, maybe
/// because you downloaded or generated it procedurally.
///
/// [`Handle`]: struct.Handle.html
pub fn from_bytes(bytes: Vec<u8>) -> Handle {
pub fn from_memory(bytes: Vec<u8>) -> Handle {
Self::from_data(Data::Bytes(bytes))
}