Skip to content

Commit

Permalink
add rust in list of languages
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Aug 30, 2024
1 parent d7e7c6e commit 03ec37a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions frontend/src/lib/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,21 @@ const scriptLanguagesArray: [SupportedLanguage | 'docker' | 'bunnative', string]
['powershell', 'PowerShell'],
['php', 'PHP'],
['rust', 'Rust'],
['docker', 'Docker'],
['docker', 'Docker']
]
export function processLangs(selected: string | undefined, langs: string[]): string[] {
if (selected === 'nativets') {
return langs
} else {
let ls = langs.filter((lang) => lang !== 'nativets')
if (!ls.includes('bunnative')) {
ls.push('bunnative')
}

//those languages are newer and may not be in the saved list
let nl = ['bunnative', 'rust']
nl.forEach((lang) => {
if (!ls.includes(lang)) {
ls.push(lang)
}
})
return ls
}
}
Expand Down

0 comments on commit 03ec37a

Please sign in to comment.