Compare two directories, canonicalizing when possible.
(a: &Path, b: &Path)
| 163 | |
| 164 | /// Compare two directories, canonicalizing when possible. |
| 165 | fn same_dir(a: &Path, b: &Path) -> bool { |
| 166 | let ca = std::fs::canonicalize(a); |
| 167 | let cb = std::fs::canonicalize(b); |
| 168 | match (ca, cb) { |
| 169 | (Ok(ca), Ok(cb)) => ca == cb, |
| 170 | _ => a == b, |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | /// Messages of the session in chronological order: `(id, role)`. |
| 175 | fn read_messages(conn: &Connection, session_id: &str) -> Option<Vec<(String, String)>> { |
no test coverage detected