Skip to content

Commit

Permalink
Remove Error::NotCreatedHere
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyr committed May 12, 2021
1 parent 68045cd commit 2156689
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use crate::GlyphName;
/// Errors that occur while working with font objects.
#[derive(Debug)]
pub enum Error {
/// An error representing our refusal to save a UFO file that was
/// not originally created by norad.
NotCreatedHere,
/// An error returned when trying to save an UFO in anything less than the latest version.
DowngradeUnsupported,
/// An error returned when trying to save a Glyph that contains a `public.objectLibs`
Expand Down Expand Up @@ -143,9 +140,6 @@ pub enum ErrorKind {
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Error::NotCreatedHere => {
write!(f, "To prevent data loss, norad will not save files created elsewhere.")
}
Error::DowngradeUnsupported => {
write!(f, "Downgrading below UFO v3 is not currently supported.")
}
Expand Down
4 changes: 0 additions & 4 deletions src/ufo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,6 @@ impl Font {
return Err(Error::DowngradeUnsupported);
}

if self.meta.creator.as_str() != DEFAULT_METAINFO_CREATOR {
return Err(Error::NotCreatedHere);
}

if self.lib.contains_key(PUBLIC_OBJECT_LIBS_KEY) {
return Err(Error::PreexistingPublicObjectLibsKey);
}
Expand Down

0 comments on commit 2156689

Please sign in to comment.