This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::borrow::Cow; | |
struct Container<'a> { | |
data: Option<Cow<'a, str>>, | |
} | |
impl<'a> Container<'a> { | |
pub fn new() -> Self { | |
Self { data: None } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0275]: overflow evaluating the requirement `&tokio_reactor::poll_evented::PollEvented<_>: std::io::Read` | |
--> query-engine/connectors/sql-connector/src/database/mysql.rs:41:32 | |
| | |
41 | builder.ip_or_hostname(e.host.as_ref()); | |
| ^^^^^^^^^^^^^^^ | |
| | |
= help: consider adding a `#![recursion_limit="128"]` attribute to your crate | |
= note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>` | |
= note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>>` | |
= note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>>>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a blocklist to block smart tv's sending meta data at home. | |
# Please help to collect domains! | |
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident. | |
# panasonic viera | |
0077777700140002.myhomescreen.tv | |
cert-test.sandbox.google.com | |
collect-eu-fy2015.myhomescreen.tv | |
collect-eu-fy2017.myhomescreen.tv | |
collect-us-fy2016.myhomescreen.tv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Add to Cargo.toml: | |
/// serde = "1.0" | |
/// serde_derive = "1.0" | |
/// serde_yaml = "0.8" | |
/// serde_json = "1.0" | |
use serde_derive::Deserialize; | |
use serde_json::{json, self}; | |
#[derive(Deserialize, Debug)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::boxed::Box; | |
trait Drawable { | |
fn draw(&self); | |
} | |
struct Button { | |
pub size: i32, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PID: 115094 (swaybar) | |
UID: 1000 (pimeys) | |
GID: 1000 (pimeys) | |
Signal: 6 (ABRT) | |
Timestamp: Wed 2019-01-23 19:10:25 CET (15min ago) | |
Command Line: swaybar -b bar-0 | |
Executable: /usr/bin/swaybar | |
Control Group: /user.slice/user-1000.slice/session-12.scope | |
Unit: session-12.scope | |
Slice: user-1000.slice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
fn main() { | |
let mut map = HashMap::new(); | |
map.insert("foo", "bar"); | |
match map.get("foo") { | |
Some(_) => { | |
map.insert("foo", "baz"); // BOOM | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARNING: This output format is intended for human consumers only | |
// and is subject to change without notice. Knock yourself out. | |
fn main() -> (){ | |
let mut _0: (); // return place | |
let mut _1: (); | |
let mut _2: std::fmt::Arguments; | |
let mut _3: &[&str]; | |
let mut _4: &[&str; 1]; | |
let mut _5: &[&str; 1]; | |
let mut _6: &[std::fmt::ArgumentV1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(await_macro, async_await, futures_api)] | |
#[macro_use] | |
extern crate tokio; | |
extern crate hyper; | |
use tokio::prelude::*; | |
use hyper::Client; | |
use std::time::Duration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling a2 v0.3.5 (/home/pimeys/code/a2) | |
error[E0277]: `(dyn tokio::prelude::Stream<Item=hyper::body::chunk::Chunk, Error=std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>> + std::marker::Send + 'static)` cannot be shared between threads safely | |
--> examples/certificate_client.rs:14:5 | |
| | |
14 | tokio::run_async(async move { |