Skip to content

Commit 6db1710

Browse files
committed
First commit
0 parents  commit 6db1710

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1174
-0
lines changed

deref-coercions/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

deref-coercions/Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deref-coercions/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "deref-coercions"
3+
version = "0.1.0"
4+
authors = ["preveen p <[email protected]>"]
5+
6+
[dependencies]

deref-coercions/src/main.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use std::ops::Deref;
2+
3+
struct DerefExample<T>{
4+
value: T,
5+
}
6+
7+
impl<T> Deref for DerefExample<T> {
8+
type Target = T;
9+
10+
fn deref(&self) -> &T {
11+
&self.value
12+
}
13+
}
14+
fn main() {
15+
let x = DerefExample { value : 'a' };
16+
17+
assert_eq!('a', *x);
18+
}
19+

eduardbopp.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//youtube video
2+
3+
Rust
4+
Systems Programming Language
5+
near C performance
6+
Statially prevents segfaults
7+
Guarantees thread safety
8+
Zero cost abstractions
9+
Lots of functional programming features;
10+
11+
:q
12+

fn-diverge/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

fn-diverge/Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fn-diverge/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "fn-diverge"
3+
version = "0.1.0"
4+
authors = ["preveen p <[email protected]>"]
5+
6+
[dependencies]

fn-diverge/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
diverges();
4+
}
5+
6+
fn diverges() -> ! {
7+
panic!("this function never returns!");
8+
}

function-pointers/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

0 commit comments

Comments
 (0)