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
╰ ➤ cargo clippy | |
/home/ben/.cargo/bin/cargo-clippy: symbol lookup error: /home/ben/.cargo/bin/cargo-clippy: undefined symbol: _ZN5rustc4util5ppaux89_$LT$impl$u20$core..fmt..Display$u20$for$u20$rustc..ty..sty..TraitRef$LT$$u27$tcx$GT$$GT$3fmt17h0ad16e3ee81d6918E | |
╰ ➤ cargo install clippy --force | |
Updating registry `https://github.com/rust-lang/crates.io-index` | |
Installing clippy v0.0.134 | |
Compiling dtoa v0.4.1 | |
Compiling lazy_static v0.2.8 | |
Compiling unicode-xid v0.0.4 | |
Compiling itoa v0.3.1 |
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[E0277]: the trait bound `std::ffi::OsString: std::borrow::Borrow<str>` is not satisfied | |
--> src/echo.rs:12:52 | |
| | |
12 | if let Some(val) = state.variables.get(key) { | |
| ^^^ the trait `std::borrow::Borrow<str>` is not implemented for `std::ffi::OsString` | |
| | |
= help: the following implementations were found: | |
<std::ffi::OsString as std::borrow::Borrow<std::ffi::OsStr>> |
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
pub struct Window { | |
connection: xcb::base::Connection, | |
window: xcb::xproto::Window, | |
foreground: xcb::Drawable, | |
pub width: u16, | |
pub height: u16, | |
} | |
impl Window { | |
pub fn new(width: u16, height: u16) -> Self { |
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
extern crate xcb; // Make sure you add xcb to your Caro.toml dependencies | |
fn main() { | |
// First thing you have to do is get a connection. You can pass an argument | |
// but if you just leave it as None you'll connect to the display device you're currently on | |
let (connection, screen_num) = xcb::Connection::connect(None).unwrap(); | |
let setup = connection.get_setup(); | |
let screen = setup.roots().nth(screen_num as usize).unwrap(); |
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
Measure-Command {python -c "import string, re, difflib, textwrap, unicodedata, stringprep, rlcompleter, struct, codecs, datetime, calendar, collections, collections.abc, heapq, bisect, array, weakref, types, copy, pprint, reprlib, enum, numbers, math, cmath, decimal, fractions, random, statistics, itertools, functools, operator, pathlib, os.path, fileinput, stat, filecmp, tempfile, glob, fnmatch, linecache, shutil, macpath, pickle, copyreg, shelve, marshal, dbm, sqlite3, zlib, gzip, bz2, zipfile, tarfile, csv, configparser, netrc, xdrlib, plistlib, hashlib, hmac, secrets, os, io, time, argparse, getopt, logging, logging.config, logging.handlers, getpass, platform, errno, ctypes, threading, multiprocessing, concurrent, concurrent.futures, sched, queue, dummy_threading, _thread, _dummy_thread, socket, ssl, select, selectors, asyncio, asyncore, asynchat, signal, mmap, email, json, mailcap, mailbox, mimetypes, base64, binhex, binascii, quopri, uu, html, html.parser, html.entities, xml, xml.etree.ElementTree, xml. |
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
function datatype,var, flag0, descriptor=desc, help=hlp, Tname = tname | |
;+ | |
; NAME: | |
; DATATYPE() | |
; | |
; PURPOSE: | |
; Returns the data type of a variable. | |
; | |
; EXPLANATION: | |
; This routine returns the data type of a variable in a format specified |
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[E0277]: the trait bound `({float}, ndarray::ArrayBase<ndarray::OwnedRepr<_>, ndarray::Dim<[usize; 1]>>): std::ops::Fn<()>` is not satisfied | |
--> src/star.rs:76:73 | |
| | |
76 | let (flux_quiet, integrated_ccf) = limb_integrals.zip(profiles).fold( | |
| ^^^^ the trait `std::ops::Fn<()>` is not implemented for `({float}, ndarray::ArrayBase<ndarray::OwnedRepr<_>, ndarray::Dim<[usize; 1]>>)` | |
error[E0277]: the trait bound `({float}, ndarray::ArrayBase<ndarray::OwnedRepr<_>, ndarray::Dim<[usize; 1]>>): std::ops::FnOnce<()>` is not satisfied | |
--> src/star.rs:76:73 | |
| | |
76 | let (flux_quiet, integrated_ccf) = limb_integrals.zip(profiles).fold( |
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
[package] | |
name = "typedemo" | |
version = "0.1.0" | |
authors = ["saethlin <[email protected]>"] | |
[dependencies.cpython] | |
version = "0.1" | |
features = ["extension-module"] | |
[lib] |
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
enum ExprNode { | |
Number(f64), | |
Variable(CString), | |
BinaryOperation(char, Box<ExprNode>, Box<ExprNode>), | |
FunctionCall(CString, Vec<Box<ExprNode>>), | |
IfElse(Box<ExprNode>, Box<ExprNode>, Box<ExprNode>), | |
ForLoop(Box<ExprNode>, Box<ExprNode>, Option<Box<ExprNode>>, Box<ExprNode>), | |
} | |
if let (ExprNode::Number(l), ExprNode::Number(r)) = (*lhs, *rhs) { |
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
pub struct Solution {} | |
impl Solution { | |
pub fn is_valid(s: &str) -> bool { | |
let mut num_open_seen = 0; | |
for (i, c) in s.chars().enumerate() { | |
let maybe_last_open = s.split_at(i) | |
.0 | |
.chars() | |
.rev() |