diff --git a/chapter1/.DS_Store b/chapter1/.DS_Store index b0a6ddb..23c7a35 100644 Binary files a/chapter1/.DS_Store and b/chapter1/.DS_Store differ diff --git a/chapter1/bench-test/Cargo.lock b/chapter1/bench-test/Cargo.lock deleted file mode 100644 index cb164a9..0000000 --- a/chapter1/bench-test/Cargo.lock +++ /dev/null @@ -1,5 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "bench-test" -version = "0.1.0" diff --git a/chapter1/bench-test/Cargo.toml b/chapter1/bench-test/Cargo.toml deleted file mode 100644 index 62dc867..0000000 --- a/chapter1/bench-test/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "bench-test" -version = "0.1.0" -authors = ["peshwar9 "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/chapter1/bench-test/src/lib.rs b/chapter1/bench-test/src/lib.rs deleted file mode 100644 index 9f15317..0000000 --- a/chapter1/bench-test/src/lib.rs +++ /dev/null @@ -1,27 +0,0 @@ -#![feature(test)] - -extern crate test; - -pub fn get_fact(n: u64) -> u64 { - if n < 2 { - 1 - } else { - n * get_fact(n - 1) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use test::Bencher; - - #[test] - fn it_works() { - assert_eq!(120, get_fact(5)); - } - - #[bench] - fn bench_get_fact(b: &mut Bencher) { - b.iter(|| get_fact(1234571)); - } -} diff --git a/chapter1/bench-test/src/main.rs b/chapter1/bench-test/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/chapter1/bench-test/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/chapter1/dep-example/.DS_Store b/chapter1/dep-example/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/chapter1/dep-example/.DS_Store and /dev/null differ diff --git a/chapter1/bench-test/.DS_Store b/chapter1/deps-example/.DS_Store similarity index 100% rename from chapter1/bench-test/.DS_Store rename to chapter1/deps-example/.DS_Store diff --git a/chapter1/dep-example/Cargo.lock b/chapter1/deps-example/Cargo.lock similarity index 98% rename from chapter1/dep-example/Cargo.lock rename to chapter1/deps-example/Cargo.lock index b6bd847..289dbbd 100644 --- a/chapter1/dep-example/Cargo.lock +++ b/chapter1/deps-example/Cargo.lock @@ -18,7 +18,7 @@ dependencies = [ ] [[package]] -name = "dep-example" +name = "deps-example" version = "0.1.0" dependencies = [ "chrono", diff --git a/chapter1/dep-example/Cargo.toml b/chapter1/deps-example/Cargo.toml similarity index 71% rename from chapter1/dep-example/Cargo.toml rename to chapter1/deps-example/Cargo.toml index 1222dcc..330aa42 100644 --- a/chapter1/dep-example/Cargo.toml +++ b/chapter1/deps-example/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "dep-example" +name = "deps-example" version = "0.1.0" -authors = ["peshwar9 "] +authors = ["peshwar9"] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chapter1/dep-example/src/main.rs b/chapter1/deps-example/src/main.rs similarity index 100% rename from chapter1/dep-example/src/main.rs rename to chapter1/deps-example/src/main.rs diff --git a/chapter1/feature-test/.DS_Store b/chapter1/feature-test/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/chapter1/feature-test/.DS_Store and /dev/null differ diff --git a/chapter1/feature-test/Cargo.lock b/chapter1/feature-test/Cargo.lock deleted file mode 100644 index 2249d11..0000000 --- a/chapter1/feature-test/Cargo.lock +++ /dev/null @@ -1,5 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "feature-test" -version = "0.1.0" diff --git a/chapter1/feature-test/Cargo.toml b/chapter1/feature-test/Cargo.toml deleted file mode 100644 index 35c27ca..0000000 --- a/chapter1/feature-test/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "feature-test" -version = "0.1.0" -authors = ["peshwar9 "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[[bin]] -name = "featuretest" -path = "src/main.rs" - -[features] -feature1 = [] - -[dependencies] diff --git a/chapter1/feature-test/src/lib.rs b/chapter1/feature-test/src/lib.rs deleted file mode 100644 index 814b4bf..0000000 --- a/chapter1/feature-test/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -#[cfg(feature = "feature1")] -pub use self::with_feature_config::execute; - -#[cfg(not(feature = "feature1"))] -pub use self::without_feature_config::execute; - -#[cfg(feature = "feature1")] -mod with_feature_config { - pub fn execute() { - println!("Executing feature 1"); - } -} - -#[cfg(not(feature = "feature1"))] -mod without_feature_config { - pub fn execute() { - println!("Not executing feature 1") - } -} diff --git a/chapter1/feature-test/src/main.rs b/chapter1/feature-test/src/main.rs deleted file mode 100644 index ba7935b..0000000 --- a/chapter1/feature-test/src/main.rs +++ /dev/null @@ -1,5 +0,0 @@ -use feature_test::execute; - -fn main() { - execute(); -} diff --git a/chapter1/first-program/Cargo.toml b/chapter1/first-program/Cargo.toml index cdefca9..c1dd125 100644 --- a/chapter1/first-program/Cargo.toml +++ b/chapter1/first-program/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "first-program" version = "0.1.0" -authors = ["peshwar9 "] +authors = ["peshwar9"] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chapter1/integ-test-example/Cargo.toml b/chapter1/integ-test-example/Cargo.toml index add807f..2455c17 100644 --- a/chapter1/integ-test-example/Cargo.toml +++ b/chapter1/integ-test-example/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "integ-test-example" version = "0.1.0" -authors = ["peshwar9 "] +authors = ["peshwar9"] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chapter1/integ-test-example/doc/itest.html b/chapter1/integ-test-example/doc/itest.html index 985c315..699151b 100644 --- a/chapter1/integ-test-example/doc/itest.html +++ b/chapter1/integ-test-example/doc/itest.html @@ -31,7 +31,7 @@ use integ_test_example; -fn get_id() -> i32 { +fn get_id() { let my_pid = get_process_id(); println!("Process id for current process is: {}", my_pid); } diff --git a/chapter1/my-first-lib/Cargo.toml b/chapter1/my-first-lib/Cargo.toml index 996a460..b37c8b8 100644 --- a/chapter1/my-first-lib/Cargo.toml +++ b/chapter1/my-first-lib/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "my-first-lib" version = "0.1.0" -authors = ["peshwar9 "] +authors = ["peshwar9"] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chapter1/test-example/Cargo.toml b/chapter1/test-example/Cargo.toml index c8451ea..7427122 100644 --- a/chapter1/test-example/Cargo.toml +++ b/chapter1/test-example/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "test-example" version = "0.1.0" -authors = ["peshwar9 "] +authors = ["peshwar9"] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chapter1/test-example/target/rls/.rustc_info.json b/chapter1/test-example/target/rls/.rustc_info.json new file mode 100644 index 0000000..69bc71d --- /dev/null +++ b/chapter1/test-example/target/rls/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":4503571881771466578,"outputs":{"1164083562126845933":["rustc 1.43.0 (4fb7144ed 2020-04-20)\nbinary: rustc\ncommit-hash: 4fb7144ed159f94491249e86d5bbd033b5d60550\ncommit-date: 2020-04-20\nhost: x86_64-apple-darwin\nrelease: 1.43.0\nLLVM version: 9.0\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/prabhueshwarla/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""]},"successes":{}} \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/.cargo-lock b/chapter1/test-example/target/rls/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/bin-test_example-1aff5c91933770bc b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/bin-test_example-1aff5c91933770bc new file mode 100644 index 0000000..ede91c5 --- /dev/null +++ b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/bin-test_example-1aff5c91933770bc @@ -0,0 +1 @@ +970e2e628c155d7e \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/bin-test_example-1aff5c91933770bc.json b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/bin-test_example-1aff5c91933770bc.json new file mode 100644 index 0000000..7b6eafa --- /dev/null +++ b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/bin-test_example-1aff5c91933770bc.json @@ -0,0 +1 @@ +{"rustc":12217307662193597186,"features":"[]","target":16120433538194145899,"profile":14891217944882224483,"path":1036222786711178230,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/test-example-1aff5c91933770bc/dep-bin-test_example-1aff5c91933770bc"}}],"rustflags":[],"metadata":13779719443416291531} \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/dep-bin-test_example-1aff5c91933770bc b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/dep-bin-test_example-1aff5c91933770bc new file mode 100644 index 0000000..cdefce3 Binary files /dev/null and b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/dep-bin-test_example-1aff5c91933770bc differ diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/invoked.timestamp b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-1aff5c91933770bc/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/dep-test-bin-test_example-b4dba4d825305f9f b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/dep-test-bin-test_example-b4dba4d825305f9f new file mode 100644 index 0000000..cdefce3 Binary files /dev/null and b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/dep-test-bin-test_example-b4dba4d825305f9f differ diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/invoked.timestamp b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/test-bin-test_example-b4dba4d825305f9f b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/test-bin-test_example-b4dba4d825305f9f new file mode 100644 index 0000000..a11b15e --- /dev/null +++ b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/test-bin-test_example-b4dba4d825305f9f @@ -0,0 +1 @@ +722ab614c849dc01 \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/test-bin-test_example-b4dba4d825305f9f.json b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/test-bin-test_example-b4dba4d825305f9f.json new file mode 100644 index 0000000..6fbd423 --- /dev/null +++ b/chapter1/test-example/target/rls/debug/.fingerprint/test-example-b4dba4d825305f9f/test-bin-test_example-b4dba4d825305f9f.json @@ -0,0 +1 @@ +{"rustc":12217307662193597186,"features":"[]","target":16120433538194145899,"profile":1647870076477133176,"path":1036222786711178230,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/test-example-b4dba4d825305f9f/dep-test-bin-test_example-b4dba4d825305f9f"}}],"rustflags":[],"metadata":13779719443416291531} \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/deps/libtest_example-1aff5c91933770bc.rmeta b/chapter1/test-example/target/rls/debug/deps/libtest_example-1aff5c91933770bc.rmeta new file mode 100644 index 0000000..e69de29 diff --git a/chapter1/test-example/target/rls/debug/deps/libtest_example-b4dba4d825305f9f.rmeta b/chapter1/test-example/target/rls/debug/deps/libtest_example-b4dba4d825305f9f.rmeta new file mode 100644 index 0000000..e69de29 diff --git a/chapter1/test-example/target/rls/debug/deps/save-analysis/test_example-1aff5c91933770bc.json b/chapter1/test-example/target/rls/debug/deps/save-analysis/test_example-1aff5c91933770bc.json new file mode 100644 index 0000000..a98234d --- /dev/null +++ b/chapter1/test-example/target/rls/debug/deps/save-analysis/test_example-1aff5c91933770bc.json @@ -0,0 +1 @@ +{"config":{"output_file":null,"full_docs":false,"pub_only":false,"reachable_only":false,"distro_crate":false,"signatures":false,"borrow_data":false},"version":"0.19.0","compilation":{"directory":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example","program":"/Users/prabhueshwarla/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rls","arguments":[],"output":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/target/rls/debug/deps/libtest_example-1aff5c91933770bc.rmeta"},"prelude":{"crate_id":{"name":"test_example","disambiguator":[8459019350643392843,18310480094168300059]},"crate_root":"src","external_crates":[{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":1,"id":{"name":"std","disambiguator":[9054049529852543209,5756799355281213394]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":2,"id":{"name":"core","disambiguator":[649336883146201894,3308516238322163950]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":3,"id":{"name":"compiler_builtins","disambiguator":[1154582834482060450,16344204990542480537]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":4,"id":{"name":"rustc_std_workspace_core","disambiguator":[9212379515936652129,17808485286264063370]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":5,"id":{"name":"alloc","disambiguator":[13327579764654116281,14306064291630426625]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":6,"id":{"name":"libc","disambiguator":[17773251733480933597,18239998491734583498]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":7,"id":{"name":"unwind","disambiguator":[8567743581675804787,15655200220621371766]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":8,"id":{"name":"cfg_if","disambiguator":[15115520782807859583,9813785573872252500]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":9,"id":{"name":"backtrace","disambiguator":[1572943810868196833,3902827232285166711]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":10,"id":{"name":"rustc_demangle","disambiguator":[6290371580101917419,15395902185345451181]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":11,"id":{"name":"backtrace_sys","disambiguator":[2934540361684350378,924291485644145262]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":12,"id":{"name":"hashbrown","disambiguator":[9277678418438935259,15657907931940784437]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":13,"id":{"name":"rustc_std_workspace_alloc","disambiguator":[5423566938548125357,18340948646597872466]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":14,"id":{"name":"panic_unwind","disambiguator":[489208416821938960,3305070343783546974]}}],"span":{"file_name":"src/main.rs","byte_start":0,"byte_end":307,"line_start":1,"line_end":19,"column_start":1,"column_end":2}},"imports":[{"kind":"Use","ref_id":{"krate":1,"index":4154},"span":{"file_name":"src/main.rs","byte_start":9,"byte_end":16,"line_start":1,"line_end":1,"column_start":10,"column_end":17},"alias_span":null,"name":"process","value":"","parent":{"krate":0,"index":0}}],"defs":[{"kind":"Mod","id":{"krate":0,"index":0},"span":{"file_name":"src/main.rs","byte_start":0,"byte_end":307,"line_start":1,"line_end":19,"column_start":1,"column_end":2},"name":"","qualname":"::","value":"src/main.rs","parent":null,"children":[{"krate":0,"index":1},{"krate":0,"index":2},{"krate":0,"index":3},{"krate":0,"index":4},{"krate":0,"index":5}],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Function","id":{"krate":0,"index":4},"span":{"file_name":"src/main.rs","byte_start":22,"byte_end":26,"line_start":3,"line_end":3,"column_start":4,"column_end":8},"name":"main","qualname":"::main","value":"fn () -> ()","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Function","id":{"krate":0,"index":5},"span":{"file_name":"src/main.rs","byte_start":75,"byte_end":89,"line_start":7,"line_end":7,"column_start":4,"column_end":18},"name":"get_process_id","qualname":"::get_process_id","value":"fn () -> u32","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]}],"impls":[],"refs":[{"kind":"Mod","span":{"file_name":"src/main.rs","byte_start":4,"byte_end":7,"line_start":1,"line_end":1,"column_start":5,"column_end":8},"ref_id":{"krate":1,"index":0}},{"kind":"Function","span":{"file_name":"src/main.rs","byte_start":50,"byte_end":64,"line_start":4,"line_end":4,"column_start":20,"column_end":34},"ref_id":{"krate":0,"index":5}},{"kind":"Function","span":{"file_name":"src/main.rs","byte_start":114,"byte_end":116,"line_start":8,"line_end":8,"column_start":14,"column_end":16},"ref_id":{"krate":1,"index":4310}},{"kind":"Mod","span":{"file_name":"src/main.rs","byte_start":105,"byte_end":112,"line_start":8,"line_end":8,"column_start":5,"column_end":12},"ref_id":{"krate":1,"index":4154}}],"macro_refs":[],"relations":[]} \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/deps/save-analysis/test_example-b4dba4d825305f9f.json b/chapter1/test-example/target/rls/debug/deps/save-analysis/test_example-b4dba4d825305f9f.json new file mode 100644 index 0000000..da06aca --- /dev/null +++ b/chapter1/test-example/target/rls/debug/deps/save-analysis/test_example-b4dba4d825305f9f.json @@ -0,0 +1 @@ +{"config":{"output_file":null,"full_docs":false,"pub_only":false,"reachable_only":false,"distro_crate":false,"signatures":false,"borrow_data":false},"version":"0.19.0","compilation":{"directory":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example","program":"/Users/prabhueshwarla/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rls","arguments":[],"output":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/target/rls/debug/deps/libtest_example-b4dba4d825305f9f.rmeta"},"prelude":{"crate_id":{"name":"test_example","disambiguator":[4961861524729821588,12376749671882091837]},"crate_root":"src","external_crates":[{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":1,"id":{"name":"std","disambiguator":[9054049529852543209,5756799355281213394]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":2,"id":{"name":"core","disambiguator":[649336883146201894,3308516238322163950]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":3,"id":{"name":"compiler_builtins","disambiguator":[1154582834482060450,16344204990542480537]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":4,"id":{"name":"rustc_std_workspace_core","disambiguator":[9212379515936652129,17808485286264063370]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":5,"id":{"name":"alloc","disambiguator":[13327579764654116281,14306064291630426625]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":6,"id":{"name":"libc","disambiguator":[17773251733480933597,18239998491734583498]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":7,"id":{"name":"unwind","disambiguator":[8567743581675804787,15655200220621371766]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":8,"id":{"name":"cfg_if","disambiguator":[15115520782807859583,9813785573872252500]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":9,"id":{"name":"backtrace","disambiguator":[1572943810868196833,3902827232285166711]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":10,"id":{"name":"rustc_demangle","disambiguator":[6290371580101917419,15395902185345451181]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":11,"id":{"name":"backtrace_sys","disambiguator":[2934540361684350378,924291485644145262]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":12,"id":{"name":"hashbrown","disambiguator":[9277678418438935259,15657907931940784437]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":13,"id":{"name":"rustc_std_workspace_alloc","disambiguator":[5423566938548125357,18340948646597872466]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":14,"id":{"name":"panic_unwind","disambiguator":[489208416821938960,3305070343783546974]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":15,"id":{"name":"test","disambiguator":[14047927703376091429,2987777764842779506]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":16,"id":{"name":"getopts","disambiguator":[8756684592220063638,17365201988200505114]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":17,"id":{"name":"rustc_std_workspace_std","disambiguator":[5624357766471051433,12442286086064031042]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":18,"id":{"name":"unicode_width","disambiguator":[392462334362905977,9392482956235306384]}},{"file_name":"/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/src/main.rs","num":19,"id":{"name":"term","disambiguator":[12331301280898709063,16641210874887239414]}}],"span":{"file_name":"src/main.rs","byte_start":0,"byte_end":307,"line_start":1,"line_end":19,"column_start":1,"column_end":2}},"imports":[{"kind":"Use","ref_id":{"krate":1,"index":4154},"span":{"file_name":"src/main.rs","byte_start":9,"byte_end":16,"line_start":1,"line_end":1,"column_start":10,"column_end":17},"alias_span":null,"name":"process","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":0,"index":5},"span":{"file_name":"src/main.rs","byte_start":162,"byte_end":176,"line_start":13,"line_end":13,"column_start":16,"column_end":30},"alias_span":null,"name":"get_process_id","value":"","parent":{"krate":0,"index":6}}],"defs":[{"kind":"Mod","id":{"krate":0,"index":0},"span":{"file_name":"src/main.rs","byte_start":0,"byte_end":307,"line_start":1,"line_end":19,"column_start":1,"column_end":2},"name":"","qualname":"::","value":"src/main.rs","parent":null,"children":[{"krate":0,"index":1},{"krate":0,"index":2},{"krate":0,"index":3},{"krate":0,"index":4},{"krate":0,"index":5},{"krate":0,"index":6},{"krate":0,"index":12}],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Function","id":{"krate":0,"index":4},"span":{"file_name":"src/main.rs","byte_start":22,"byte_end":26,"line_start":3,"line_end":3,"column_start":4,"column_end":8},"name":"main","qualname":"::main","value":"fn () -> ()","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[{"value":"allow(dead_code)","span":{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1}}]},{"kind":"Function","id":{"krate":0,"index":5},"span":{"file_name":"src/main.rs","byte_start":75,"byte_end":89,"line_start":7,"line_end":7,"column_start":4,"column_end":18},"name":"get_process_id","qualname":"::get_process_id","value":"fn () -> u32","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Mod","id":{"krate":0,"index":6},"span":{"file_name":"src/main.rs","byte_start":139,"byte_end":144,"line_start":12,"line_end":12,"column_start":5,"column_end":10},"name":"tests","qualname":"::tests","value":"src/main.rs","parent":null,"children":[{"krate":0,"index":7},{"krate":0,"index":8},{"krate":0,"index":9},{"krate":0,"index":11}],"decl_id":null,"docs":"","sig":null,"attributes":[{"value":"cfg(test)","span":{"file_name":"src/main.rs","byte_start":122,"byte_end":134,"line_start":11,"line_end":11,"column_start":1,"column_end":13}}]},{"kind":"Function","id":{"krate":0,"index":11},"span":{"file_name":"src/main.rs","byte_start":198,"byte_end":228,"line_start":16,"line_end":16,"column_start":8,"column_end":38},"name":"test_if_process_id_is_returned","qualname":"::tests::test_if_process_id_is_returned","value":"fn () -> ()","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]}],"impls":[],"refs":[{"kind":"Mod","span":{"file_name":"src/main.rs","byte_start":4,"byte_end":7,"line_start":1,"line_end":1,"column_start":5,"column_end":8},"ref_id":{"krate":1,"index":0}},{"kind":"Function","span":{"file_name":"src/main.rs","byte_start":50,"byte_end":64,"line_start":4,"line_end":4,"column_start":20,"column_end":34},"ref_id":{"krate":0,"index":5}},{"kind":"Function","span":{"file_name":"src/main.rs","byte_start":114,"byte_end":116,"line_start":8,"line_end":8,"column_start":14,"column_end":16},"ref_id":{"krate":1,"index":4310}},{"kind":"Mod","span":{"file_name":"src/main.rs","byte_start":105,"byte_end":112,"line_start":8,"line_end":8,"column_start":5,"column_end":12},"ref_id":{"krate":1,"index":4154}},{"kind":"Function","span":{"file_name":"src/main.rs","byte_start":155,"byte_end":160,"line_start":13,"line_end":13,"column_start":9,"column_end":14},"ref_id":{"krate":0,"index":5}},{"kind":"Function","span":{"file_name":"src/main.rs","byte_start":252,"byte_end":266,"line_start":17,"line_end":17,"column_start":20,"column_end":34},"ref_id":{"krate":0,"index":5}}],"macro_refs":[],"relations":[]} \ No newline at end of file diff --git a/chapter1/test-example/target/rls/debug/deps/test_example-1aff5c91933770bc.d b/chapter1/test-example/target/rls/debug/deps/test_example-1aff5c91933770bc.d new file mode 100644 index 0000000..5cf164c --- /dev/null +++ b/chapter1/test-example/target/rls/debug/deps/test_example-1aff5c91933770bc.d @@ -0,0 +1,5 @@ +/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/target/rls/debug/deps/test_example-1aff5c91933770bc.rmeta: src/main.rs + +/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/target/rls/debug/deps/test_example-1aff5c91933770bc.d: src/main.rs + +src/main.rs: diff --git a/chapter1/test-example/target/rls/debug/deps/test_example-b4dba4d825305f9f.d b/chapter1/test-example/target/rls/debug/deps/test_example-b4dba4d825305f9f.d new file mode 100644 index 0000000..d97f01f --- /dev/null +++ b/chapter1/test-example/target/rls/debug/deps/test_example-b4dba4d825305f9f.d @@ -0,0 +1,5 @@ +/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/target/rls/debug/deps/test_example-b4dba4d825305f9f.rmeta: src/main.rs + +/Users/prabhueshwarla/rust/author/packt/code/prod/chapter1/test-example/target/rls/debug/deps/test_example-b4dba4d825305f9f.d: src/main.rs + +src/main.rs: diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/dep-graph.bin b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/dep-graph.bin new file mode 100644 index 0000000..6b5923d Binary files /dev/null and b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/dep-graph.bin differ diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/query-cache.bin b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/query-cache.bin new file mode 100644 index 0000000..8fca92e Binary files /dev/null and b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/query-cache.bin differ diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/work-products.bin b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/work-products.bin new file mode 100644 index 0000000..dbafc7a Binary files /dev/null and b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63-37e7m5wpe6xgm/work-products.bin differ diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63.lock b/chapter1/test-example/target/rls/debug/incremental/test_example-11p4h44bo0tjo/s-frq7c2pzgp-110yh63.lock new file mode 100755 index 0000000..e69de29 diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/dep-graph.bin b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/dep-graph.bin new file mode 100644 index 0000000..c260ef6 Binary files /dev/null and b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/dep-graph.bin differ diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/query-cache.bin b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/query-cache.bin new file mode 100644 index 0000000..9d0d540 Binary files /dev/null and b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/query-cache.bin differ diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/work-products.bin b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/work-products.bin new file mode 100644 index 0000000..dbafc7a Binary files /dev/null and b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94-y0gbhq37ri9n/work-products.bin differ diff --git a/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94.lock b/chapter1/test-example/target/rls/debug/incremental/test_example-1s9mw3mkdo2tn/s-frq7c2ggrm-120zo94.lock new file mode 100755 index 0000000..e69de29 diff --git a/chapter1/test-example/tests/integration_test1.rs b/chapter1/test-example/tests/integration_test1.rs deleted file mode 100644 index d243261..0000000 --- a/chapter1/test-example/tests/integration_test1.rs +++ /dev/null @@ -1,7 +0,0 @@ -use my-process-lib; - - #[test] - fn test_if_process_id_is_returned() { - assert_eq!(get_process_id(), 0, "There is error in code"); - println!("Hello from integration test") - }