From 2a2d2546484461957ed994af617ea3a890d01d3b Mon Sep 17 00:00:00 2001 From: Xu Shaohua Date: Wed, 15 Nov 2023 16:26:09 +0800 Subject: [PATCH] weiss: Remove subfolders --- Cargo.lock | 2 +- Cargo.toml | 2 +- weiss/CMakeLists.txt | 3 +-- weiss/Cargo.toml | 23 +++++++++++++++++++ weiss/{c03 => c}/CMakeLists.txt | 0 weiss/{c03 => c}/linked_list.c | 0 weiss/{c03 => c}/linked_list.h | 0 weiss/{c03 => c}/polynomial_array.c | 0 weiss/{c03 => c}/polynomial_array.h | 0 weiss/c02/Cargo.toml | 7 ------ weiss/c07/CMakeLists.txt | 0 weiss/{c02/src/bin => src}/binary_search.rs | 0 weiss/{c02/src/bin => src}/gcd.rs | 0 weiss/{c02/src/bin => src}/pow.rs | 0 .../src/bin => src}/subsequence_of_sum.rs | 0 15 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 weiss/Cargo.toml rename weiss/{c03 => c}/CMakeLists.txt (100%) rename weiss/{c03 => c}/linked_list.c (100%) rename weiss/{c03 => c}/linked_list.h (100%) rename weiss/{c03 => c}/polynomial_array.c (100%) rename weiss/{c03 => c}/polynomial_array.h (100%) delete mode 100644 weiss/c02/Cargo.toml delete mode 100644 weiss/c07/CMakeLists.txt rename weiss/{c02/src/bin => src}/binary_search.rs (100%) rename weiss/{c02/src/bin => src}/gcd.rs (100%) rename weiss/{c02/src/bin => src}/pow.rs (100%) rename weiss/{c02/src/bin => src}/subsequence_of_sum.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index a45a9548..ca5fd27e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -658,7 +658,7 @@ dependencies = [ ] [[package]] -name = "weiss_c02" +name = "weiss" version = "0.1.0" [[package]] diff --git a/Cargo.toml b/Cargo.toml index eef491cf..88baa57d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ members = [ # Custome "leetcode/*.*", "robert", - "weiss/c02", + "weiss", ] exclude = [ diff --git a/weiss/CMakeLists.txt b/weiss/CMakeLists.txt index a9713514..5847b64f 100644 --- a/weiss/CMakeLists.txt +++ b/weiss/CMakeLists.txt @@ -2,5 +2,4 @@ cmake_minimum_required(VERSION 3.10) project(weiss C) -add_subdirectory(c03) -add_subdirectory(c07) +add_subdirectory(c) diff --git a/weiss/Cargo.toml b/weiss/Cargo.toml new file mode 100644 index 00000000..b5d8ec94 --- /dev/null +++ b/weiss/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "weiss" +version = "0.1.0" +edition = "2021" +publish = false + +[[bin]] +name = "weiss_gcd" +path = "src/gcd.rs" + +[[bin]] +name = "weiss_binary_search" +path = "src/binary_search.rs" + +[[bin]] +name = "weiss_pow" +path = "src/pow.rs" + +[[bin]] +name = "weiss_subsequence_of_sum" +path = "src/subsequence_of_sum.rs" + +[dependencies] diff --git a/weiss/c03/CMakeLists.txt b/weiss/c/CMakeLists.txt similarity index 100% rename from weiss/c03/CMakeLists.txt rename to weiss/c/CMakeLists.txt diff --git a/weiss/c03/linked_list.c b/weiss/c/linked_list.c similarity index 100% rename from weiss/c03/linked_list.c rename to weiss/c/linked_list.c diff --git a/weiss/c03/linked_list.h b/weiss/c/linked_list.h similarity index 100% rename from weiss/c03/linked_list.h rename to weiss/c/linked_list.h diff --git a/weiss/c03/polynomial_array.c b/weiss/c/polynomial_array.c similarity index 100% rename from weiss/c03/polynomial_array.c rename to weiss/c/polynomial_array.c diff --git a/weiss/c03/polynomial_array.h b/weiss/c/polynomial_array.h similarity index 100% rename from weiss/c03/polynomial_array.h rename to weiss/c/polynomial_array.h diff --git a/weiss/c02/Cargo.toml b/weiss/c02/Cargo.toml deleted file mode 100644 index cac4d9ab..00000000 --- a/weiss/c02/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "weiss_c02" -version = "0.1.0" -edition = "2021" -publish = false - -[dependencies] diff --git a/weiss/c07/CMakeLists.txt b/weiss/c07/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/weiss/c02/src/bin/binary_search.rs b/weiss/src/binary_search.rs similarity index 100% rename from weiss/c02/src/bin/binary_search.rs rename to weiss/src/binary_search.rs diff --git a/weiss/c02/src/bin/gcd.rs b/weiss/src/gcd.rs similarity index 100% rename from weiss/c02/src/bin/gcd.rs rename to weiss/src/gcd.rs diff --git a/weiss/c02/src/bin/pow.rs b/weiss/src/pow.rs similarity index 100% rename from weiss/c02/src/bin/pow.rs rename to weiss/src/pow.rs diff --git a/weiss/c02/src/bin/subsequence_of_sum.rs b/weiss/src/subsequence_of_sum.rs similarity index 100% rename from weiss/c02/src/bin/subsequence_of_sum.rs rename to weiss/src/subsequence_of_sum.rs