Skip to content

Commit

Permalink
update rules_rust
Browse files Browse the repository at this point in the history
  • Loading branch information
burakemir committed Apr 5, 2024
1 parent e706b46 commit f4df848
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
*~
Cargo.Bazel.lock
bazel-*
rust-project.json

13 changes: 7 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# To find additional information on this release or newer ones visit:
# https://github.com/bazelbuild/rules_rust/releases
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_rust",
sha256 = "950a3ad4166ae60c8ccd628d1a8e64396106e7f98361ebe91b0bcfe60d8e4b60",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.20.0/rules_rust-v0.20.0.tar.gz"],
integrity = "sha256-mUV3N2A8ORVVZbrm3O9yepAe/Kv4MD2ob9YQhB8aOI8=",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.41.1/rules_rust-v0.41.1.tar.gz"],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")

rules_rust_dependencies()

load("@rules_rust//util/import:deps.bzl", "import_deps")

import_deps()

rust_register_toolchains()

load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
Expand Down Expand Up @@ -46,3 +43,7 @@ load("@third_party//:defs.bzl", "crate_repositories")

crate_repositories()

load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")

rust_analyzer_dependencies()

6 changes: 0 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import::import! {
"//third_party/hex";
"//third_party/sha2";
"//third_party/clap";
}

use clap::Parser;
use myhasher_lib as myhasher;
use std::fs::read_dir;
Expand Down
8 changes: 0 additions & 8 deletions src/myhasher.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import::import! {
"//third_party/sha2";
}

use std::io::prelude::BufRead;
use std::io::Result;

Expand All @@ -25,10 +21,6 @@ pub fn hash(buf_reader: &mut dyn BufRead, filename: &str) -> Result<FileWithHash

#[cfg(test)]
mod tests {
import::import! {
"//third_party/hex";
"//third_party/googletest";
}
use googletest::prelude::*;

#[test]
Expand Down

0 comments on commit f4df848

Please sign in to comment.