internal: improve compilation critical path a bit

This commit is contained in:
Aleksey Kladov
2021-08-28 22:03:06 +03:00
parent 0dabcf0044
commit c639fe333f
7 changed files with 12 additions and 34 deletions

View File

@@ -7,14 +7,15 @@
//! for separation of code responsibility.
pub(crate) mod flat;
use paths::AbsPathBuf;
use std::path::PathBuf;
use serde::{Deserialize, Serialize};
use crate::rpc::flat::FlatTree;
#[derive(Clone, Eq, PartialEq, Debug, Serialize, Deserialize)]
pub struct ListMacrosTask {
pub lib: AbsPathBuf,
pub lib: PathBuf,
}
#[derive(Copy, Clone, Eq, PartialEq, Debug, Serialize, Deserialize)]
@@ -46,7 +47,7 @@ pub struct ExpansionTask {
/// Possible attributes for the attribute-like macros.
pub attributes: Option<FlatTree>,
pub lib: AbsPathBuf,
pub lib: PathBuf,
/// Environment variables to set during macro expansion.
pub env: Vec<(String, String)>,
@@ -93,7 +94,7 @@ mod tests {
macro_body: FlatTree::new(&tt),
macro_name: Default::default(),
attributes: None,
lib: AbsPathBuf::assert(std::env::current_dir().unwrap()),
lib: std::env::current_dir().unwrap(),
env: Default::default(),
};