mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 22:17:58 +00:00
use normal style for comments
Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
//!
|
||||
//! Process for compiling a single compilation unit.
|
||||
//!
|
||||
//! The input data.
|
||||
//!
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
@@ -10,9 +7,7 @@ use serde::Serialize;
|
||||
use crate::project::contract::Contract;
|
||||
use crate::project::Project;
|
||||
|
||||
///
|
||||
/// The input data.
|
||||
///
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Input {
|
||||
/// The contract representation.
|
||||
@@ -32,9 +27,7 @@ pub struct Input {
|
||||
}
|
||||
|
||||
impl Input {
|
||||
///
|
||||
/// A shortcut constructor.
|
||||
///
|
||||
pub fn new(
|
||||
contract: Contract,
|
||||
project: Project,
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//!
|
||||
//! Process for compiling a single compilation unit.
|
||||
//!
|
||||
|
||||
pub mod input;
|
||||
pub mod output;
|
||||
@@ -18,9 +16,7 @@ use self::output::Output;
|
||||
/// The overriden executable name used when the compiler is run as a library.
|
||||
pub static EXECUTABLE: OnceCell<PathBuf> = OnceCell::new();
|
||||
|
||||
///
|
||||
/// Read input from `stdin`, compile a contract, and write the output to `stdout`.
|
||||
///
|
||||
pub fn run() -> anyhow::Result<()> {
|
||||
let mut stdin = std::io::stdin();
|
||||
let mut stdout = std::io::stdout();
|
||||
@@ -60,9 +56,7 @@ pub fn run() -> anyhow::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Runs this process recursively to compile a single contract.
|
||||
///
|
||||
pub fn call(input: Input) -> anyhow::Result<Output> {
|
||||
let input_json = serde_json::to_vec(&input).expect("Always valid");
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
//!
|
||||
//! Process for compiling a single compilation unit.
|
||||
//!
|
||||
//! The output data.
|
||||
//!
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::build::contract::Contract as ContractBuild;
|
||||
|
||||
///
|
||||
/// The output data.
|
||||
///
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Output {
|
||||
/// The contract build.
|
||||
@@ -19,9 +14,7 @@ pub struct Output {
|
||||
}
|
||||
|
||||
impl Output {
|
||||
///
|
||||
/// A shortcut constructor.
|
||||
///
|
||||
pub fn new(build: ContractBuild) -> Self {
|
||||
Self { build }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user