1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::DenoLanguage;
use proto_core::{async_trait, ProtoError, Verifiable};
use std::path::{Path, PathBuf};

#[async_trait]
impl Verifiable<'_> for DenoLanguage {
    fn get_checksum_path(&self) -> Result<PathBuf, ProtoError> {
        Ok(self.temp_dir.join("checksum"))
    }

    fn get_checksum_url(&self) -> Result<Option<String>, ProtoError> {
        Ok(None)
    }

    async fn verify_checksum(
        &self,
        _checksum_file: &Path,
        _download_file: &Path,
    ) -> Result<bool, ProtoError> {
        // Deno doesn't have checksums!
        Ok(true)
    }
}