Skip to content

Instantly share code, notes, and snippets.

The Rust Playground rust-play

Block or report user

Report or block rust-play

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
pub fn component_min<R2, C2, SB>(&self, rhs: &Matrix<N, R2, C2, SB>) -> Matrix<N, R, C, S>
where
N: Signed,
R2: Dim, C2: Dim,
DefaultAllocator: Allocator<N, R, C>,
{
let mut res = self.clone_owned();
for j in 0 .. res.ncols() {
for i in 0 .. res.nrows() {
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
fn main(){
let spots = make_board();
render(&spots)
}
fn make_board() -> Vec<Tokens> {
let mut count = 0;
let mut spots:Vec<Tokens> = Vec::new();
let values = [4,9,2,3,5,7,8,1,6];
for val in &values {
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
fn main(){
let spots = make_board();
render(&spots)
}
fn make_board() -> Vec<Tokens> {
let mut count = 0;
let mut spots:Vec<Tokens> = Vec::new();
let values = [4,9,2,3,5,7,8,1,6];
for val in &values {
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
#[derive(Debug)]
struct Tokens {
idx: i8,
val: i8,
chr: char,
}
impl Tokens {
fn new(idx: i8, val: i8, chr: char) -> Tokens {
Tokens {
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable
sys-devices-platform-scb-fd500000.pcie-pci0000:00-0000:00:00.0-0000:01:00.0-us
sys-devices-platform-scb-fd580000.genet-net-eth0.device loaded active plugged
sys-devices-platform-soc-fe201000.serial-tty-ttyAMA0-hci0.device loaded active
sys-devices-platform-soc-fe201000.serial-tty-ttyAMA0.device loaded active plug
sys-devices-platform-soc-fe300000.mmcnr-mmc_host-mmc1-mmc1:0001-mmc1:0001:1-ne
sys-devices-platform-soc-fe340000.emmc2-mmc_host-mmc0-mmc0:0001-block-mmcblk0-
sys-devices-platform-soc-fe340000.emmc2-mmc_host-mmc0-mmc0:0001-block-mmcblk0-
sys-devices-platform-soc-fe340000.emmc2-mmc_host-mmc0-mmc0:0001-block-mmcblk0.
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable
sys-devices-platform-scb-fd500000.pcie-pci0000:00-0000:00:00.0-0000:01:00.0-us
sys-devices-platform-scb-fd580000.genet-net-eth0.device loaded active plugged
sys-devices-platform-soc-fe201000.serial-tty-ttyAMA0-hci0.device loaded active
sys-devices-platform-soc-fe201000.serial-tty-ttyAMA0.device loaded active plug
sys-devices-platform-soc-fe300000.mmcnr-mmc_host-mmc1-mmc1:0001-mmc1:0001:1-ne
sys-devices-platform-soc-fe340000.emmc2-mmc_host-mmc0-mmc0:0001-block-mmcblk0-
sys-devices-platform-soc-fe340000.emmc2-mmc_host-mmc0-mmc0:0001-block-mmcblk0-
sys-devices-platform-soc-fe340000.emmc2-mmc_host-mmc0-mmc0:0001-block-mmcblk0.
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
i@pi4:~ $ systemctl status
● pi4
State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Wed 1969-12-31 17:00:08 MST; 49 years 9 months ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
i@pi4:~ $ systemctl status
● pi4
State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Wed 1969-12-31 17:00:08 MST; 49 years 9 months ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
trait T {
fn foo(_: usize, _: usize, _: usize) {}
}
fn main() {
T::foo(1, 3, 4, 5);
}
@rust-play
rust-play / playground.rs
Created Oct 18, 2019
Code shared from the Rust Playground
View playground.rs
trait T {
fn foo(_: usize, _: usize, _: usize) {}
}
fn main() {
T::foo(1, 3, 4, 5);
}
You can’t perform that action at this time.