From 98e883f0f956678f6d060c1b819b637a2b43d7e2 Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Sun, 25 Aug 2024 00:35:36 +0900 Subject: [PATCH] =?UTF-8?q?rp2040-adt7310=20=E3=81=AB=20secret=20=E3=81=84?= =?UTF-8?q?=E3=82=89=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rp2040-adt7310/build.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/rp2040-adt7310/build.rs b/rp2040-adt7310/build.rs index 66781cc..a0a7ad2 100644 --- a/rp2040-adt7310/build.rs +++ b/rp2040-adt7310/build.rs @@ -10,7 +10,7 @@ use std::env; use std::fs::File; -use std::io::{BufRead, BufReader, Write}; +use std::io::Write; use std::path::PathBuf; fn main() { @@ -32,23 +32,4 @@ fn main() { { println!("cargo:rustc-link-arg=-Tdefmt.x"); } - - let (id, password) = File::open("secrets.txt") - .and_then(|file| { - let mut file = BufReader::new(file); - let mut id = String::new(); - file.read_line(&mut id)?; - let mut password = String::new(); - file.read_line(&mut password)?; - Ok((id, password)) - }) - .unwrap_or_else(|_| { - ( - "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".into(), - "xxxxxxxxxxxx".into(), - ) - }); - println!("cargo:rustc-env=SECRETS_ROUTE_B_ID={id}"); - println!("cargo:rustc-env=SECRETS_ROUTE_B_PASSWORD={password}"); - println!("cargo:rerun-if-changed=secrets.txt"); }