A direct search for charged lepton-flavour violation in top-quark decays is presented. The data analysed correspond to $79.8 text{fb}^{-1}$ of proton--proton collisions at a centre-of-mass energy of $sqrt{s}=13 text{TeV}$ recorded by the ATLAS experiment at the LHC. The process studied is the production of top-quark pairs, where one top quark decays into a pair of opposite-sign different-flavour charged leptons and an up-type quark, while the other decays semileptonically according to the Standard Model. The signature of the signal is thus characterised by the presence of three charged leptons, a light jet and a $b$-jet. A multivariate discriminant is deployed and its distribution used as input to extract the signal strength. In the absence of a signal, an upper limit on the branching ratio of ${cal B}(t to ell ell q) < 1.86 times 10^{-5}$ is set at the 95% confidence level.