Update readmes

This commit is contained in:
asonix 2019-10-28 18:25:24 -05:00
parent 0673f48634
commit 306d4a3289
4 changed files with 6 additions and 33 deletions

View file

@ -17,14 +17,8 @@ activitystreams = "0.3"
And then use it in your project And then use it in your project
```rust ```rust
extern crate activitystreams;
extern crate anyhow;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
use activitystreams::{context, Object, Actor, object::Profile}; use activitystreams::{context, Object, Actor, object::Profile};
use serde_derive::{Serialize, Deserialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
@ -73,17 +67,10 @@ serde_json = "1.0"
And then in your project And then in your project
```rust ```rust
#[macro_use] #[macro_use]
extern crate activitystreams_derive; use activitystreams_derive::{Properties, UnitString};
extern crate activitystreams_traits;
extern crate activitystreams_types;
extern crate anyhow;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
use activitystreams_traits::{Link, Object}; use activitystreams_traits::{Link, Object};
use activitystreams_types::{CustomLink, link::Mention}; use activitystreams_types::{CustomLink, link::Mention};
use serde_derive::{Deserialize, Serialize};
/// Using the UnitString derive macro /// Using the UnitString derive macro
/// ///

View file

@ -19,15 +19,9 @@ serde_json = "1.0"
And then in your project And then in your project
```rust ```rust
#[macro_use] use activitystreams_derive::{Properties, UnitString};
extern crate activitystreams_derive;
extern crate activitystreams_traits;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
use activitystreams_traits::{Link, Object}; use activitystreams_traits::{Link, Object};
use serde_derive::{Deserialize, Serialize};
/// Using the UnitString derive macro /// Using the UnitString derive macro
/// ///

View file

@ -11,12 +11,8 @@ projects. See the `activitystreams-types` crate for examples of how these traits
## Examples ## Examples
```rust ```rust
extern crate activitystreams_traits;
extern crate serde;
#[macro_use]
extern crate serde_derive;
use activitystreams_traits::{Object, Actor}; use activitystreams_traits::{Object, Actor};
use serde_derive::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]

View file

@ -17,10 +17,6 @@ Then use it in your project!
```rust ```rust
// in your project // in your project
extern crate activitystreams_types;
extern crate failure;
extern crate serde_json;
use activitystreams_types::{context, link::Mention}; use activitystreams_types::{context, link::Mention};
use failure::Error; use failure::Error;