Skip to content

Commit

Permalink
Bump crate version, remove deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyr committed Aug 20, 2021
1 parent 27f5b1e commit a7ba909
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 52 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "norad"
version = "0.4.0"
version = "0.5.0"
authors = ["Colin Rofls <[email protected]>", "Nikolaus Waxweiler <[email protected]>"]
license = "MIT/Apache-2.0"
edition = "2018"
Expand Down
36 changes: 0 additions & 36 deletions src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ pub struct Font {
pub data_request: DataRequest,
}

#[doc(hidden)]
#[deprecated(since = "0.4.0", note = "Renamed to Font")]
pub type Ufo = Font;

/// A version of the [UFO spec].
///
/// [UFO spec]: http://unifiedfontobject.org
Expand Down Expand Up @@ -82,18 +78,6 @@ impl Font {
Font::default()
}

/// Create a new `Font` only with certain fields.
#[doc(hidden)]
#[deprecated(
since = "0.4.1",
note = "To load only specific fields, use Font::load_requested_data"
)]
pub fn with_fields(data_request: DataRequest) -> Self {
let mut ufo = Self::new();
ufo.data_request = data_request;
ufo
}

/// Attempt to load a font object from a file.
///
/// `path` must point to a directory with the structure described in
Expand Down Expand Up @@ -201,14 +185,6 @@ impl Font {
Ok(Font { layers, meta, font_info, lib, groups, kerning, features, data_request: request })
}

#[deprecated(
since = "0.4.1",
note = "To load only specific fields, use Font::load_requestd_data"
)]
pub fn load_ufo<P: AsRef<Path>>(&self, path: P) -> Result<Font, Error> {
Font::load_requested_data(path, self.data_request)
}

/// Attempt to save this UFO to the given path, overriding any existing contents.
///
/// This may fail; instead of saving directly to the target path, it is a good
Expand Down Expand Up @@ -308,23 +284,11 @@ impl Font {
self.layers.default_layer()
}

#[deprecated(since = "0.4.0", note = "use default_layer instead")]
#[doc(hidden)]
pub fn get_default_layer(&self) -> Option<&Layer> {
Some(self.default_layer())
}

/// Returns a mutable reference to the default layer.
pub fn default_layer_mut(&mut self) -> &mut Layer {
self.layers.default_layer_mut()
}

#[deprecated(since = "0.4.0", note = "use default_layer instead")]
#[doc(hidden)]
pub fn get_default_layer_mut(&mut self) -> Option<&mut Layer> {
Some(self.default_layer_mut())
}

/// Returns an iterator over all layers in this font object.
pub fn iter_layers(&self) -> impl Iterator<Item = &Layer> {
self.layers.iter()
Expand Down
12 changes: 0 additions & 12 deletions src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,18 +447,6 @@ impl Layer {
}
}

#[doc(hidden)]
#[deprecated(since = "0.4.0", note = "renamed to 'iter'")]
pub fn iter_contents(&self) -> impl Iterator<Item = &Arc<Glyph>> + '_ {
self.iter()
}

#[doc(hidden)]
#[deprecated(since = "0.4.0", note = "renamed to 'iter_mut'")]
pub fn iter_contents_mut(&mut self) -> impl Iterator<Item = &mut Glyph> {
self.iter_mut()
}

/// Iterate over the glyphs in this layer.
pub fn iter(&self) -> impl Iterator<Item = &Arc<Glyph>> + '_ {
self.glyphs.values()
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,3 @@ pub use kerning::Kerning;
pub use layer::{Layer, LayerSet};
pub use shared_types::{Color, IntegerOrFloat, NonNegativeIntegerOrFloat, Plist};
pub use write::{QuoteChar, WriteOptions};

#[allow(deprecated)]
pub use font::Ufo;

0 comments on commit a7ba909

Please sign in to comment.