Skip to content

Improve lazy_static -> SharedBytes conversion

Jeremy Soller requested to merge alexheretic:master into master

Created by: alexheretic

  • Add From<&AsRef<[u8]>> for SharedBytes improving lazy_static case ergonomics. Allows:
    lazy_static! {
        static ref BYTES: Vec<u8> = vec![0, 1, 2, 3];
    }
    let shared_bytes: SharedBytes<'static> = (&*BYTES).into();
  • Add SharedBytes conversion doc tests.
  • Improve image example adding dynamic sizing to more easily switch fonts.
  • Remove old confs from rustfmt.toml
  • Run rustfmt

Merge request reports