From 21566895decaea5360f42350d319bdcfa91d0b72 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Wed, 12 May 2021 12:05:47 -0400 Subject: [PATCH] Remove Error::NotCreatedHere --- src/error.rs | 6 ------ src/ufo.rs | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/error.rs b/src/error.rs index 8a9144b8..cd2d130c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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` @@ -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.") } diff --git a/src/ufo.rs b/src/ufo.rs index 3df3e506..a3f40518 100644 --- a/src/ufo.rs +++ b/src/ufo.rs @@ -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); }