From 4525b2eb16d6b6915f73b906fb1c5a7040365451 Mon Sep 17 00:00:00 2001 From: ControlCplusControlV <44706811+ControlCplusControlV@users.noreply.github.com> Date: Wed, 12 Jan 2022 14:44:01 -0700 Subject: [PATCH] Remove Example Project (#623) --- example_project/example_dependency/Forc.toml | 8 -- .../example_dependency/src/main.sw | 4 - example_project/fuel_project/Forc.toml | 8 -- example_project/fuel_project/src/main.sw | 79 ------------------- 4 files changed, 99 deletions(-) delete mode 100644 example_project/example_dependency/Forc.toml delete mode 100644 example_project/example_dependency/src/main.sw delete mode 100644 example_project/fuel_project/Forc.toml delete mode 100644 example_project/fuel_project/src/main.sw diff --git a/example_project/example_dependency/Forc.toml b/example_project/example_dependency/Forc.toml deleted file mode 100644 index d16ebb6080a..00000000000 --- a/example_project/example_dependency/Forc.toml +++ /dev/null @@ -1,8 +0,0 @@ -[project] -author = "Fuel Labs " -license = "Apache-2.0" -name = "example_dependency" -entry = "main.sw" - - -[dependencies] diff --git a/example_project/example_dependency/src/main.sw b/example_project/example_dependency/src/main.sw deleted file mode 100644 index 6083806ca3b..00000000000 --- a/example_project/example_dependency/src/main.sw +++ /dev/null @@ -1,4 +0,0 @@ -library example; -pub trait ExampleTrait { - fn a_function(self) -> u64; -} diff --git a/example_project/fuel_project/Forc.toml b/example_project/fuel_project/Forc.toml deleted file mode 100644 index caa2ac4b0a3..00000000000 --- a/example_project/fuel_project/Forc.toml +++ /dev/null @@ -1,8 +0,0 @@ -[project] -author = "Fuel Labs " -license = "Apache-2.0" -name = "Fuel example project" - - -[dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std" } diff --git a/example_project/fuel_project/src/main.sw b/example_project/fuel_project/src/main.sw deleted file mode 100644 index a4bc1029e3f..00000000000 --- a/example_project/fuel_project/src/main.sw +++ /dev/null @@ -1,79 +0,0 @@ -script; -use core::ops::Ord; - -struct Rgb { - red: u64, - green: u64, - blue: u64, -} - - -enum PrimaryColor { - Red : (), - Green : (), - Blue : () -} - -impl Ord for PrimaryColor { - fn gt(self, other: Self) -> bool { - asm(r1: self, r2: other, r3) { - gt r3 r1 r2; - r3: bool - } - } - fn lt(self, other: Self) -> bool { - asm(r1: self, r2: other, r3) { - lt r3 r1 r2; - r3: bool - } - } - fn eq(self, other: Self) -> bool { - asm(r1: self, r2: other, r3) { - eq r3 r1 r2; - r3: bool - } - } -} - -impl Color for PrimaryColor { - // TODO: when we support match statements, change this to a match statement - fn rgb(self) -> Rgb { - if self == PrimaryColor::Red { - Rgb { - red: 255, - blue: 0, - green: 0, - } - } - else if self == PrimaryColor::Green { - Rgb { - red: 0, - blue: 0, - green: 255, - } - } - else if self == PrimaryColor::Blue { - Rgb { - red: 0, - blue: 255, - green: 0, - } - } - else { - Rgb { - red: 0, - blue: 0, - green: 0 - } - } - } -} - -fn main() { - let first_color = PrimaryColor::Green; - let rgb: Rgb = first_color.rgb(); -} - -trait Color { - fn rgb(self) -> Rgb; -}