From 7719a1c61b08f7ca527e357e0b8795814a8c6e34 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Tue, 25 Jan 2022 12:56:30 +1100 Subject: [PATCH] Refresh Cargo.toml, README.md Remove superfluous things, update useful things. --- Cargo.toml | 8 +++----- README.md | 13 ++----------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 166549a..b9ce2e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,9 @@ [package] name = "anymap" version = "0.12.1" -authors = ["Chris Morgan "] +authors = ["Chris Morgan "] description = "A safe and convenient store for one value of each type" -documentation = "https://docs.rs/anymap" -#homepage = "https://github.com/chris-morgan/anymap" repository = "https://github.com/chris-morgan/anymap" -readme = "README.md" -keywords = ["container", "data-structure", "map"] +keywords = ["container", "any", "map"] +categories = ["rust-patterns", "data-structures"] license = "BlueOak-1.0.0 OR MIT OR Apache-2.0" diff --git a/README.md b/README.md index 358c262..cd88937 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ -``AnyMap``, a safe and convenient store for one value of each type -================================================================== - -[![Build Status](https://travis-ci.org/chris-morgan/anymap.svg?branch=master)](https://travis-ci.org/chris-morgan/anymap) +# ``AnyMap``, a safe and convenient store for one value of each type If you’re familiar with Go and Go web frameworks, you may have come across the common “environment” pattern for storing data related to the request. It’s typically something like ``map[string]interface{}`` and is accessed with arbitrary strings which may clash and type assertions which are a little unwieldy and must be used very carefully. (Personally I would consider that it is just *asking* for things to blow up in your face.) In a language like Go, lacking in generics, this is the best that can be done; such a thing cannot possibly be made safe without generics. @@ -13,13 +10,7 @@ The ``AnyMap`` type is a friendly wrapper around a ``HashMap>`` What this means is that in an ``AnyMap`` you may store zero or one values for every type. -Instructions ------------- - -Cargo all the way: it is `anymap` on crates.io. - -Unsafe code in this library ---------------------------- +## Unsafe code in this library This library uses a fair bit of unsafe code for several reasons: -- 2.42.0