Skip to content

Commit

Permalink
💡 Remove confusing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jokeyrhyme committed Nov 15, 2024
1 parent 7bb570e commit 74fba26
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,13 @@ impl TryFrom<Document> for BusConfig {
impl BusConfig {
pub fn limits(&self) -> Limits {
match self.r#type {
// For the session bus, override the default relatively-low limits with essentially
// infinite limits, since the bus is just running as the user anyway, using up bus
// resources is not something we need to worry about. In some cases, we do set the
// limits lower than "all available memory" if exceeding the limit is almost certainly a
// bug, having the bus enforce a limit is nicer than a huge memory leak. But the intent
// is that these limits should never be hit.
Some(BusType::Session) => Limits {
/* For the session bus, override the default relatively-low limits
with essentially infinite limits, since the bus is just running
as the user anyway, using up bus resources is not something we need
to worry about. In some cases, we do set the limits lower than
"all available memory" if exceeding the limit is almost certainly a bug,
having the bus enforce a limit is nicer than a huge memory leak. But the
intent is that these limits should never be hit. */
// dbus-daemon / dbus-broker is limited to the highest positive number in i32,
// but we use u32 here, so we can pick the preferred 4GB memory limits
max_incoming_bytes: 4000000000,
Expand Down Expand Up @@ -256,13 +255,7 @@ impl BusConfig {
#[derive(Clone, Debug, Deserialize, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum BusType {
/// The DBUS_STARTER_BUS_TYPE environment variable will be set to "session",
/// and the DBUS_SESSION_BUS_ADDRESS environment variable will be set to the address of the
/// session bus.
Session,
/// The DBUS_STARTER_BUS_TYPE environment variable will be set to "system",
/// and the DBUS_SYSTEM_BUS_ADDRESS environment variable will be set to the address of the
/// system bus.
System,
}

Expand Down

0 comments on commit 74fba26

Please sign in to comment.