From 7d17751f50552e50db06cb37e5fc896998b4b0c9 Mon Sep 17 00:00:00 2001 From: Bat Date: Mon, 11 Jun 2018 13:30:14 +0100 Subject: [PATCH] Definitively get rid of the activitystreams crates --- Cargo.lock | 22 +++------------------- Cargo.toml | 3 +-- src/activity_pub/inbox.rs | 3 +-- src/main.rs | 1 - src/models/posts.rs | 6 ++++-- 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8671f2a0..cb86b4ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [[package]] name = "activitypub" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -31,20 +31,6 @@ dependencies = [ "serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "activitystreams-types" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "activitystreams-types" version = "0.2.0" @@ -1022,8 +1008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "plume" version = "0.1.0" dependencies = [ - "activitypub 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "activitystreams-types 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "activitypub 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ammonia 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "array_tool 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1947,10 +1932,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum activitypub 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c87040997a45d9da90327a11191bda4f2b1812d8c3e2062ea8d539eb8e2bfde7" +"checksum activitypub 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab73fd715ad1e74fb44e4b2356db91a158793a2472a0c19e9002ab3184773d87" "checksum activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48db826c588a009960d74530e7c215e21fae130f585362504dc6b6357e5ce86b" "checksum activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "670ef03168e704b0cae242e7a5d8b40506772b339687e01a3496fc4afe2e8542" -"checksum activitystreams-types 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aff9aa0c3412fe4da72a1f6e4b1c2e9792bfdf1308b709389192f17aa8e2b3cd" "checksum activitystreams-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14806b3c88c439e1670fdc99d9b18bf1a47d4fa7152fe8a3bd7da08b6ced3e95" "checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45" "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" diff --git a/Cargo.toml b/Cargo.toml index 9f90b6e8..819d8a4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,7 @@ authors = ["Bat' "] name = "plume" version = "0.1.0" [dependencies] -activitypub = "0.1" -activitystreams-types = "0.1" +activitypub = "0.1.1" array_tool = "1.0" base64 = "0.9" bcrypt = "0.2" diff --git a/src/activity_pub/inbox.rs b/src/activity_pub/inbox.rs index 4560e7b7..789ab130 100644 --- a/src/activity_pub/inbox.rs +++ b/src/activity_pub/inbox.rs @@ -1,9 +1,8 @@ use activitypub::{ Actor, activity::{Accept, Announce, Create, Follow, Like, Undo}, - object::Note + object::{Article, Note} }; -use activitystreams_types::object::Article; use diesel::PgConnection; use failure::Error; use serde_json; diff --git a/src/main.rs b/src/main.rs index 90ecbc7c..ce8f78d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,6 @@ #![plugin(rocket_codegen)] extern crate activitypub; -extern crate activitystreams_types; extern crate array_tool; extern crate base64; extern crate bcrypt; diff --git a/src/models/posts.rs b/src/models/posts.rs index 206e6acd..be2ce429 100644 --- a/src/models/posts.rs +++ b/src/models/posts.rs @@ -1,5 +1,7 @@ -use activitypub::activity::Create; -use activitystreams_types::object::{Article, properties::ObjectProperties}; +use activitypub::{ + activity::Create, + object::{Article, properties::ObjectProperties} +}; use chrono::NaiveDateTime; use diesel::{self, PgConnection, RunQueryDsl, QueryDsl, ExpressionMethods, BelongingToDsl, dsl::any}; use serde_json;