This file contains 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
spellmaster/crates/test_terminal on main ●● | |
● ❯ cargo c | |
Checking test_terminal v0.1.0 (/Users/felipesere/Development/rust/spellmaster/crates/test_terminal) | |
error[E0277]: the trait bound `&Input: std::io::Read` is not satisfied | |
--> src/lib.rs:25:36 | |
| | |
25 | Term::read_write_pair(&*x, &*y) | |
| --------------------- ^^^ the trait `std::io::Read` is not implemented for `&Input` | |
| | | |
| required by a bound introduced by this call |
This file contains 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
struct Provider<A> { | |
api: A, | |
tracked_resources: TrackedResources, | |
} | |
struct Api { ...}; | |
impl Api { | |
fn create_thing() -> ThingBuilder {...} | |
} |
This file contains 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
pub struct AwsProvider(Inner); | |
struct Inner { | |
creds: Credentials, | |
region: String, | |
tracked_resources: RwLock<Vec<Box<dyn Resource<Aws>>>>, | |
} | |
// TODO: it would be nice if this could magically put the | |
// reosurce on the heap (Arc<Box<...>>) and then return |
This file contains 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 clap::Clap; | |
#[derive(Debug, PartialEq, Clap)] | |
struct Opt { | |
#[clap(global = true, long)] | |
global: bool, | |
#[clap(subcommand)] | |
sub: Subcommands, | |
} |
This file contains 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
package diagnostics | |
import ( | |
"errors" | |
"fmt" | |
"sort" | |
"strings" | |
) | |
type Diagnostic struct { |
This file contains 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
[crates/oro-tree/src/lib.rs:33] &f = MainPackage { | |
name: "sane-flags", | |
version: "0.3.1", | |
requires: true, | |
dependencies: { | |
"@babel/code-frame": Package { | |
name: None, | |
version: "7.10.4", | |
requires: { | |
"@babel/highlight": "^7.10.4", |
This file contains 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
let mut app = tide::with_state(state.clone()); | |
app.middleware(RequestLogger::new()); | |
/* | |
app.at("/").get(tide::redirect("/files/index.html")); | |
app.at("/files").strip_prefix().get(StaticFilesEndpoint { | |
root: "./tldr-github-parcel/dist".into(), | |
}); | |
*/ | |
let root_for_files = "./tldr-github-parcel/dist"; |
This file contains 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
pub fn add_items_to_track( | |
db: Arc<dyn Db>, | |
client: Arc<dyn ClientForRepositories + Send + Sync>, | |
id: i32, | |
items: Vec<api::ItemToTrack>, | |
) -> Result<()> { | |
log::info!("We were about to add {:?} to {}", items, id); | |
if let Some(repo) = db.find_repo(id) { | |
let mut tasks = FuturesUnordered::new(); | |
for item in items { |
This file contains 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
<script> | |
import { fade } from 'svelte/transition'; | |
import Github from './Github.svelte'; | |
import GlowBox from '../GlowBox.svelte'; | |
import Indicator, {Recency} from './Indicator.svelte'; | |
import Settings from '../settings/Settings.svelte'; | |
import Content from './Content.svelte'; | |
export let repo | |
let showSettings = false; | |
let items = filterItems(repo, 'all'); |
This file contains 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
// What I write right now | |
pub fn all(conn: &Conn) -> Result<Vec<FullStoredRepo>> { | |
use schema::repos::dsl::*; | |
let rs: Vec<StoredRepo> = repos.load(conn).with_context(|| "getting all repos")?; | |
let ids: Vec<i32> = rs.iter().map(|r| r.id).collect(); | |
use schema::issues::dsl::{issues, repo_id as issue_repo_id}; | |
let isx = issues |
NewerOlder