File tree Expand file tree Collapse file tree 3 files changed +6
-17
lines changed
Expand file tree Collapse file tree 3 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ impl Display for AgentID {
5959
6060impl 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
104103impl 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}
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments