diff --git a/LICENSE b/LICENSE index b1b75fa..87ad0c2 100644 --- a/LICENSE +++ b/LICENSE @@ -17,3 +17,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +The code is based on the charset implementation of hyper: +https://github.com/hyperium/hyper/blob/7b108466f6a53d0ffdc6c7889d1a01fca251e462/src/header/shared/charset.rs +licensed under MIT, written by seanmonstar, SBSTP, hugoduncan, fhartwig and Pyfisch. diff --git a/src/lib.rs b/src/lib.rs index 8f92d1d..6097f77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -201,12 +201,14 @@ mod tests { #[test] fn test_display() { - assert_eq!("US-ASCII", format!("{}", UsAscii)); - assert_eq!("ABCD", format!("{}", Unregistered("ABCD".to_owned()))); + assert_eq!("US-ASCII", UsAscii.to_string()); + assert_eq!("ABCD", Unregistered("ABCD".to_owned()).to_string()); } #[test] fn test_cmp() { + assert!(Iso88593 == Iso88593); + assert!(UsAscii != Iso88593); assert_eq!(Unregistered("foobar".to_owned()), Unregistered("FOOBAR".to_owned())); } }