Skip to content

Instantly share code, notes, and snippets.

//! Container for resources, that can be any type. This is inspired by Shred and AnyMap.
//! AnyMap didn't fill my usecase as there is no way to borrow mutably 2 values for different
//! keys. (`get_mut(&mut self)`).
//!
//! This container is using interior mutability with `RefCell` to allow this usecase.
//! Downcasting trait does not work with pure rust so I am using a crate called `downcast_rs` to
//! do it.
//!
//!
//! How to use.
diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml
index 3287729..dc43ad1 100644
--- a/tracing-subscriber/Cargo.toml
+++ b/tracing-subscriber/Cargo.toml
@@ -20,7 +20,7 @@ keywords = ["logging", "tracing", "metrics", "subscriber"]
[features]
-default = ["env-filter", "smallvec", "fmt", "ansi", "chrono", "tracing-log"]
+default = ["env-filter", "smallvec", "fmt", "chrono", "tracing-log"]
use diesel::pg::PgConnection;
use diesel::prelude::*;
use diesel_migrations::embed_migrations;
use std::default::Default;
use actix_web::dev::Server;
use mycrate::app;
use mycrate::app::AppConfig;
use std::sync::mpsc;
use std::thread;
➜ image-rs git:(master) ✗ cargo build
Compiling image v0.22.0 (/home/benoit/PROJECT/image-rs)
error[E0592]: duplicate definitions with name `save`
--> src/buffer.rs:766:5
|
766 | / pub fn save<Q>(&self, path: Q) -> io::Result<()>
767 | | where
768 | | Q: AsRef<Path>,
769 | | {
... |
impl<P, Container> ImageBuffer<P, Container>
where
P: Pixel<Subpixel = u8> + 'static,
Container: Deref<Target = [u8]>,
{
/// Saves the buffer to a file at the path specified.
///
/// The image format is derived from the file extension.
/// Currently only jpeg and png files are supported.
/home/benoit/opt/clion-2018.2.2/bin/cmake/linux/bin/cmake --build /home/benoit/PROJECT/pistache/cmake-build-debug --target run_listener_test -- -j 2
Scanning dependencies of target pistache
[ 3%] Building CXX object googletest-release-1.7.0/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 7%] Building CXX object src/CMakeFiles/pistache.dir/common/cookie.cc.o
[ 11%] Building CXX object src/CMakeFiles/pistache.dir/common/description.cc.o
In file included from /home/benoit/PROJECT/pistache/src/common/description.cc:10:
In file included from /home/benoit/PROJECT/pistache/include/pistache/description.h:19:
In file included from /home/benoit/PROJECT/pistache/include/pistache/router.h:12:
In file included from /home/benoit/PROJECT/pistache/include/pistache/http.h:27:
In file included from /home/benoit/PROJECT/pistache/include/pistache/tcp.h:13: