Skip to content

Commit eb519a2

Browse files
authored
chore: remove some TODOs (#2058)
1 parent 7d30b74 commit eb519a2

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

agent-control/src/agent_control/agent_id.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ impl Display for AgentID {
5959

6060
impl AsRef<Path> for AgentID {
6161
fn as_ref(&self) -> &Path {
62-
// TODO: define how AgentID should be converted to a Path here.
6362
Path::new(self.as_str())
6463
}
6564
}
@@ -103,7 +102,6 @@ impl Display for SubAgentID {
103102

104103
impl AsRef<Path> for SubAgentID {
105104
fn as_ref(&self) -> &Path {
106-
// TODO: define how SubAgentID should be converted to a Path here.
107105
Path::new(self.as_str())
108106
}
109107
}

agent-control/src/on_host/file_store.rs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,12 @@ where
122122
T: DeserializeOwned,
123123
{
124124
trace!("Loading data from path '{}'", key.display());
125-
self.load_file_if_present(&key)
126-
// TODO: Address the generation of this error by
127-
// reworking the errors in the `fs` crate so they
128-
// emit std::io::Error instead.
129-
.map_err(Error::other)
130-
.and_then(|maybe_values| {
131-
maybe_values
132-
.map(|s| serde_yaml::from_str(&s))
133-
.transpose()
134-
// TODO: Address the generation of this error by
135-
// reworking the errors in the `fs` crate so they
136-
// emit std::io::Error instead.
137-
.map_err(|err| Error::new(ErrorKind::InvalidData, err))
138-
})
125+
self.load_file_if_present(&key).and_then(|maybe_values| {
126+
maybe_values
127+
.map(|s| serde_yaml::from_str(&s))
128+
.transpose()
129+
.map_err(|err| Error::new(ErrorKind::InvalidData, err))
130+
})
139131
}
140132
}
141133

agent-control/src/sub_agent/collection.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ where
3030
}
3131

3232
pub(crate) fn insert(&mut self, agent_id: AgentID, sub_agent: S) -> Option<S> {
33-
// TODO: handle error
3433
self.0.insert(agent_id, sub_agent)
3534
}
3635

0 commit comments

Comments
 (0)