Skip to content

Commit

Permalink
docs(rsjudge-runner): 📝 fix doc and license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisu-Woniu committed Apr 17, 2024
1 parent 521578d commit 743dab8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/rsjudge-runner/src/cap_handle.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

//! RAII-style Capability handle.
use std::{cell::RefCell, collections::HashMap, rc::Rc};

Expand Down
5 changes: 4 additions & 1 deletion crates/rsjudge-runner/src/run_as.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

use std::io::{self, ErrorKind};

use capctl::Cap;
Expand All @@ -11,10 +13,11 @@ use crate::{
error::{Error, Result},
};

/// A trait to allow running a [`tokio::process::Command`] as another user.
pub trait RunAs {
type Error;

/// Run the command as the given user.
/// Run the [`Command`] as the given [`User`].
///
/// This function will set the UID, GID, and supplementary groups of the command.
///
Expand Down
2 changes: 2 additions & 0 deletions crates/rsjudge-runner/src/timing.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

use std::{
sync::OnceLock,
time::{Duration, Instant},
Expand Down

0 comments on commit 743dab8

Please sign in to comment.