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